Skip to content

Commit d5077f6

Browse files
author
esuau
committed
Add knobs to search component story
1 parent 9860111 commit d5077f6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/search/search.stories.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { storiesOf, moduleMetadata } from "@storybook/angular";
2-
import { withKnobs } from "@storybook/addon-knobs/angular";
2+
import { withKnobs, boolean, select, text } from "@storybook/addon-knobs/angular";
33

44
import { SearchModule } from "../";
55

@@ -12,14 +12,24 @@ storiesOf("Search", module).addDecorator(
1212
.add("Basic", () => ({
1313
template: `
1414
<div style="width: 250px;">
15-
<ibm-search [size]="'lg'"></ibm-search>
15+
<ibm-search [theme]="theme" [placeholder]="placeholder" size="lg"></ibm-search>
1616
</div>
17-
`
17+
`,
18+
props: {
19+
theme: select("theme", ["dark", "light"], "dark"),
20+
disabled: boolean("disabled", false),
21+
placeholder: text("placeholder", "Search")
22+
}
1823
}))
1924
.add("Small", () => ({
2025
template: `
2126
<div style="width: 250px;">
22-
<ibm-search [size]="'sm'"></ibm-search>
27+
<ibm-search [theme]="theme" [placeholder]="placeholder" size="sm"></ibm-search>
2328
</div>
24-
`
29+
`,
30+
props: {
31+
theme: select("theme", ["dark", "light"], "dark"),
32+
disabled: boolean("disabled", false),
33+
placeholder: text("placeholder", "Search")
34+
}
2535
}));

0 commit comments

Comments
 (0)