diff --git a/src/components/input/MultiSelect.stories.ts b/src/components/input/MultiSelect.stories.ts index 5df5fa909..abea5eb72 100644 --- a/src/components/input/MultiSelect.stories.ts +++ b/src/components/input/MultiSelect.stories.ts @@ -29,6 +29,13 @@ const meta: Meta = { searchPlaceholder: { control: 'text' } + }, + args: { + label: 'Select', + hasSearchBox: false, + showSelectedCount: false, + hasClearButton: false, + searchPlaceholder: 'Search...' } } @@ -164,3 +171,41 @@ export const MultipleSelectors: Story = { ` }) } + +export const WithSearchBox: Story = { + ...Default, + args: { + hasSearchBox: true + } +} + +export const WithSelectedCount: Story = { + ...Default, + args: { + showSelectedCount: true + } +} + +export const WithClearButton: Story = { + ...Default, + args: { + hasClearButton: true + } +} + +export const AllHeaderFeatures: Story = { + ...Default, + args: { + hasSearchBox: true, + showSelectedCount: true, + hasClearButton: true + } +} + +export const CustomSearchPlaceholder: Story = { + ...Default, + args: { + hasSearchBox: true, + searchPlaceholder: 'Filter packages...' + } +} diff --git a/src/components/input/MultiSelect.vue b/src/components/input/MultiSelect.vue index d1d02a4f1..1192e5f22 100644 --- a/src/components/input/MultiSelect.vue +++ b/src/components/input/MultiSelect.vue @@ -13,14 +13,18 @@ v-if="hasSearchBox || showSelectedCount || hasClearButton" #header > -
+
-
+
-
+
diff --git a/src/components/input/SearchBox.stories.ts b/src/components/input/SearchBox.stories.ts index bdd26aa80..c67776597 100644 --- a/src/components/input/SearchBox.stories.ts +++ b/src/components/input/SearchBox.stories.ts @@ -15,6 +15,10 @@ const meta: Meta = { control: 'boolean', description: 'Toggle border prop' } + }, + args: { + placeHolder: 'Search...', + hasBorder: false } } @@ -29,9 +33,23 @@ export const Default: Story = { return { searchText, args } }, template: ` -
- +
+
` }) } + +export const WithBorder: Story = { + ...Default, + args: { + hasBorder: true + } +} + +export const NoBorder: Story = { + ...Default, + args: { + hasBorder: false + } +} diff --git a/src/components/widget/layout/BaseWidget.stories.ts b/src/components/widget/layout/BaseWidget.stories.ts index 31e988cb2..0ac0341de 100644 --- a/src/components/widget/layout/BaseWidget.stories.ts +++ b/src/components/widget/layout/BaseWidget.stories.ts @@ -240,6 +240,9 @@ const createStoryTemplate = (args: StoryArgs) => ({ v-model="selectedFrameworks" label="Select Frameworks" :options="frameworkOptions" + :has-search-box="true" + :show-selected-count="true" + :has-clear-button="true" />