mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
17 lines
357 B
Plaintext
17 lines
357 B
Plaintext
```md
|
|
<!-- Button.stories.mdx --->
|
|
|
|
import { Story } from '@storybook/addon-docs';
|
|
|
|
import Button from './Button.vue';
|
|
|
|
export const Template = (args, { argTypes }) => ({
|
|
props: Object.keys(argTypes),
|
|
components: { Button },
|
|
template: '<Button v-bind="$props" />',
|
|
});
|
|
|
|
<Story name="Basic" args={{ label: 'hello' }}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
``` |