mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 22:31:55 +08:00
24 lines
483 B
Plaintext
24 lines
483 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) => ({
|
|
components: { YourComponent },
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: '<YourComponent v-bind="args" />',
|
|
}),
|
|
};
|
|
```
|