mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 04:01:48 +08:00
26 lines
506 B
Plaintext
26 lines
506 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) => ({
|
|
components: { Button },
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: '<Button v-bind="args" />',
|
|
})} />
|
|
``` |