storybook/docs/snippets/vue/button-story-with-args.mdx-2.mdx.mdx
2021-10-11 19:57:39 +01:00

23 lines
526 B
Plaintext

```md
<!-- Button.stories.mdx-->
import { Meta, Story } from '@storybook/addon-docs';
import Button from './Button.vue';
<Meta title="Button" component={Button} />
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
<Story
name="Primary"
args={{
primary: true,
label: 'Button',
}}
render={(args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { Button },
template: `<Button v-bind="$props" v-on="$props" />`,
})} />
```