chore(CheckboxFilter): add stories for CheckboxFilter
This commit is contained in:
37
src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte
Normal file
37
src/shared/ui/CheckboxFilter/CheckboxFilter.stories.svelte
Normal file
@@ -0,0 +1,37 @@
|
||||
<script module>
|
||||
import { createFilter } from '$shared/lib';
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import CheckboxFilter from './CheckboxFilter.svelte';
|
||||
|
||||
const { Story } = defineMeta({
|
||||
title: 'Shared/CheckboxFilter',
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
docs: {
|
||||
story: { inline: false }, // Render stories in iframe for state isolation
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
const filter = createFilter({
|
||||
properties: [{
|
||||
id: 'cats',
|
||||
name: 'Cats',
|
||||
value: 'cats',
|
||||
}, {
|
||||
id: 'dogs',
|
||||
name: 'Dogs',
|
||||
value: 'dogs',
|
||||
}, {
|
||||
id: 'birds',
|
||||
name: 'Birds',
|
||||
value: 'birds',
|
||||
}],
|
||||
});
|
||||
</script>
|
||||
|
||||
<Story name="Default">
|
||||
<CheckboxFilter {filter} displayedLabel="Zoo" />
|
||||
</Story>
|
||||
Reference in New Issue
Block a user