fix story

This commit is contained in:
Benjamin Palko 2024-12-31 11:55:40 -05:00
parent 5287eb794a
commit f88b960bbe

View file

@ -1,7 +1,8 @@
<script module lang="ts"> <script module lang="ts">
import { defineMeta } from '@storybook/addon-svelte-csf'; import { defineMeta } from '@storybook/addon-svelte-csf';
import Button from './Button.svelte';
import { fn } from '@storybook/test'; import { fn } from '@storybook/test';
import type { ComponentProps } from 'svelte';
import Button from './Button.svelte';
const { Story } = defineMeta({ const { Story } = defineMeta({
title: 'Actions/Button', title: 'Actions/Button',
@ -10,6 +11,7 @@
onClick: fn(), onClick: fn(),
}, },
argTypes: { argTypes: {
block: { control: 'boolean' },
color: { color: {
control: 'select', control: 'select',
options: [ options: [
@ -25,9 +27,12 @@
'error', 'error',
], ],
}, },
full: { control: 'boolean' },
glass: { control: 'boolean' },
outline: { outline: {
control: 'boolean', control: 'boolean',
}, },
responsive: { control: 'boolean' },
size: { size: {
control: 'select', control: 'select',
options: ['Default', 'xs', 'sm', 'lg'], options: ['Default', 'xs', 'sm', 'lg'],
@ -37,8 +42,13 @@
control: 'select', control: 'select',
options: ['button', 'reset', 'submit'], options: ['button', 'reset', 'submit'],
}, },
wide: { control: 'boolean' },
}, },
}); });
</script> </script>
<Story name="Default" args={{ label: 'Button', color: 'primary' }} /> {#snippet template({ children: _, ...props }: Partial<ComponentProps<typeof Button>>)}
<Button {...props}>Button</Button>
{/snippet}
<Story name="Default" args={{}} children={template} />