storybook/docs/snippets/vue/component-story-mdx-story-by-name.mdx-3.mdx.mdx
2021-10-11 19:57:39 +01:00

24 lines
489 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="Basic"
args={{
label: 'hello'
}}
render={(args) => ({
components: { Button },
setup() {
return { args };
},
template: '<Button v-bind="args" />',
})} />
```