init
This commit is contained in:
commit
451223816b
338 changed files with 9938 additions and 0 deletions
31
src/stories/Button.stories.svelte
Normal file
31
src/stories/Button.stories.svelte
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import Button from './Button.svelte';
|
||||
import { fn } from 'storybook/test';
|
||||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
||||
const { Story } = defineMeta({
|
||||
title: 'Example/Button',
|
||||
component: Button,
|
||||
tags: ['autodocs'],
|
||||
argTypes: {
|
||||
backgroundColor: { control: 'color' },
|
||||
size: {
|
||||
control: { type: 'select' },
|
||||
options: ['small', 'medium', 'large'],
|
||||
},
|
||||
},
|
||||
args: {
|
||||
onclick: fn(),
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -->
|
||||
<Story name="Primary" args={{ primary: true, label: 'Button' }} />
|
||||
|
||||
<Story name="Secondary" args={{ label: 'Button' }} />
|
||||
|
||||
<Story name="Large" args={{ size: 'large', label: 'Button' }} />
|
||||
|
||||
<Story name="Small" args={{ size: 'small', label: 'Button' }} />
|
||||
Loading…
Add table
Add a link
Reference in a new issue