mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
23 lines
375 B
Plaintext
23 lines
375 B
Plaintext
```md
|
|
<!-- Button.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import Button from './Button.svelte';
|
|
|
|
<Meta title="Components/Button" component={Button} />
|
|
|
|
export const Template = (args) => ({
|
|
Component: Button,
|
|
props: args,
|
|
});
|
|
|
|
<Story
|
|
name="Primary"
|
|
args={{
|
|
primary: true,
|
|
label: 'Button',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
``` |