chore: basic storybook coverage for shared/ui components
This commit is contained in:
26
src/shared/ui/SearchBar/SearchBar.stories.svelte
Normal file
26
src/shared/ui/SearchBar/SearchBar.stories.svelte
Normal file
@@ -0,0 +1,26 @@
|
||||
<script module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import SearchBar from './SearchBar.svelte';
|
||||
|
||||
const { Story } = defineMeta({
|
||||
title: 'Shared/SearchBar',
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
docs: {
|
||||
story: { inline: false }, // Render stories in iframe for state isolation
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
let value = $state('');
|
||||
</script>
|
||||
|
||||
<Story name="Default">
|
||||
<SearchBar bind:value={value} placeholder="Type here...">
|
||||
Here will be the search result
|
||||
<br />
|
||||
Popover closes only when the user clicks outside the search bar or presses the Escape key.
|
||||
</SearchBar>
|
||||
</Story>
|
||||
Reference in New Issue
Block a user