fix story
This commit is contained in:
parent
5287eb794a
commit
f88b960bbe
1 changed files with 12 additions and 2 deletions
|
|
@ -1,7 +1,8 @@
|
|||
<script module lang="ts">
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import Button from './Button.svelte';
|
||||
import { fn } from '@storybook/test';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import Button from './Button.svelte';
|
||||
|
||||
const { Story } = defineMeta({
|
||||
title: 'Actions/Button',
|
||||
|
|
@ -10,6 +11,7 @@
|
|||
onClick: fn(),
|
||||
},
|
||||
argTypes: {
|
||||
block: { control: 'boolean' },
|
||||
color: {
|
||||
control: 'select',
|
||||
options: [
|
||||
|
|
@ -25,9 +27,12 @@
|
|||
'error',
|
||||
],
|
||||
},
|
||||
full: { control: 'boolean' },
|
||||
glass: { control: 'boolean' },
|
||||
outline: {
|
||||
control: 'boolean',
|
||||
},
|
||||
responsive: { control: 'boolean' },
|
||||
size: {
|
||||
control: 'select',
|
||||
options: ['Default', 'xs', 'sm', 'lg'],
|
||||
|
|
@ -37,8 +42,13 @@
|
|||
control: 'select',
|
||||
options: ['button', 'reset', 'submit'],
|
||||
},
|
||||
wide: { control: 'boolean' },
|
||||
},
|
||||
});
|
||||
</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} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue