Skip to content

Commit

Permalink
fix footer style
Browse files Browse the repository at this point in the history
  • Loading branch information
yujonglee committed Sep 24, 2024
1 parent f61c2ae commit 2670f46
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
20 changes: 20 additions & 0 deletions js/packages/web/src/components/canary-content.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import "./canary-search-results";

import "./canary-ask";
import "./canary-ask-results";
import "./canary-footer";

enum Kind {
Search,
SearchWithFooter,
SearchCustomSize,
SearchWithGlobFilter,
SearchWithAsk,
Expand Down Expand Up @@ -71,6 +73,7 @@ export default {
</canary-content>
`;
}

if (kind === Kind.SearchWithAsk) {
return html`
<canary-content>
Expand All @@ -85,6 +88,18 @@ export default {
`;
}

if (kind === Kind.SearchWithFooter) {
return html`
<canary-content>
<canary-input slot="input"></canary-input>
<canary-search slot="mode">
<canary-search-results slot="body"></canary-search-results>
</canary-search>
<canary-footer slot="footer"></canary-footer>
</canary-content>
`;
}

throw new Error();
},
} satisfies Meta<{ kind: Kind }>;
Expand All @@ -94,6 +109,11 @@ export const Search: StoryObj = {
play: type("20hi"),
};

export const SearchWithFooter: StoryObj = {
args: { kind: Kind.SearchWithFooter },
play: type("20hi"),
};

export const SearchWithGlobFilter: StoryObj = {
args: { kind: Kind.SearchWithGlobFilter },
play: type("20hi"),
Expand Down
7 changes: 5 additions & 2 deletions js/packages/web/src/components/canary-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export class CanaryContent extends LitElement {
hide: !this._query || this._footers.length === 0,
})}
>
<slot name="footer"></slot>
<div class="footer">
<slot name="footer"></slot>
</div>
</div>
</div>
`;
Expand Down Expand Up @@ -63,7 +65,8 @@ export class CanaryContent extends LitElement {
`,
css`
.footer {
padding: 6px 0 2px 12px;
padding-top: 2px;
padding-right: 6px;
}
.hide {
Expand Down

0 comments on commit 2670f46

Please sign in to comment.