mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:21:49 +08:00
22 lines
475 B
Plaintext
22 lines
475 B
Plaintext
```js
|
|
// YourComponent.stories.js
|
|
|
|
import YourComponent from './YourComponent.vue';
|
|
|
|
//👇 This default export determines where your story goes in the story list
|
|
export default {
|
|
component: YourComponent,
|
|
};
|
|
|
|
export const FirstStory = {
|
|
args: {
|
|
//👇 The args you need here will depend on your component
|
|
},
|
|
render: (args, { argTypes }) => ({
|
|
components: { Button },
|
|
props: Object.keys(argTypes),
|
|
template: '<Button v-bind="$props" />',
|
|
}),
|
|
};
|
|
```
|