feat: add missing storybook files and type template arguments properly
This commit is contained in:
@@ -27,10 +27,11 @@ const { Story } = defineMeta({
|
||||
|
||||
<script lang="ts">
|
||||
import { Button } from '$shared/ui/Button';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
</script>
|
||||
|
||||
<Story name="Default">
|
||||
{#snippet template(args)}
|
||||
{#snippet template(args: ComponentProps<typeof ButtonGroup>)}
|
||||
<ButtonGroup {...args}>
|
||||
<Button variant="tertiary">Option 1</Button>
|
||||
<Button variant="tertiary">Option 2</Button>
|
||||
@@ -40,7 +41,7 @@ import { Button } from '$shared/ui/Button';
|
||||
</Story>
|
||||
|
||||
<Story name="Horizontal">
|
||||
{#snippet template(args)}
|
||||
{#snippet template(args: ComponentProps<typeof ButtonGroup>)}
|
||||
<ButtonGroup {...args}>
|
||||
<Button variant="tertiary">Day</Button>
|
||||
<Button variant="tertiary" active>Week</Button>
|
||||
@@ -51,7 +52,7 @@ import { Button } from '$shared/ui/Button';
|
||||
</Story>
|
||||
|
||||
<Story name="Vertical">
|
||||
{#snippet template(args)}
|
||||
{#snippet template(args: ComponentProps<typeof ButtonGroup>)}
|
||||
<ButtonGroup {...args} class="flex-col">
|
||||
<Button variant="tertiary">Top</Button>
|
||||
<Button variant="tertiary" active>Middle</Button>
|
||||
@@ -61,7 +62,7 @@ import { Button } from '$shared/ui/Button';
|
||||
</Story>
|
||||
|
||||
<Story name="With Icons">
|
||||
{#snippet template(args)}
|
||||
{#snippet template(args: ComponentProps<typeof ButtonGroup>)}
|
||||
<ButtonGroup {...args}>
|
||||
<Button variant="tertiary">Grid</Button>
|
||||
<Button variant="tertiary" active>List</Button>
|
||||
@@ -78,7 +79,7 @@ import { Button } from '$shared/ui/Button';
|
||||
},
|
||||
}}
|
||||
>
|
||||
{#snippet template(args)}
|
||||
{#snippet template(args: ComponentProps<typeof ButtonGroup>)}
|
||||
<div class="p-8 bg-background text-foreground">
|
||||
<h3 class="mb-4 text-sm font-medium">Dark Mode</h3>
|
||||
<ButtonGroup {...args}>
|
||||
|
||||
Reference in New Issue
Block a user