storybook/docs/snippets/vue/button-story-with-args.mdx-3.mdx.mdx
2021-08-09 19:19:01 +01:00

26 lines
438 B
Plaintext

```md
<!-- Button.stories.mdx-->
import { Meta, Story } from "@storybook/addon-docs";
import Button from './Button.vue';
<Meta title="Components/Button" component={Button}/>
export const Template = (args) => ({
components: { Button },
setup() {
return { args };
},
template: '<Button v-bind="args" />',
});
<Story
name="Primary"
args={{
primary: true,
label: 'Button',
}}>
{Template.bind({})}
</Story>
```