storybook/docs/snippets/vue/your-component.3.js.mdx
2023-11-27 20:57:51 -07:00

29 lines
684 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,
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/api/csf
* to learn how to use render functions.
*/
export const FirstStory = {
render: (args) => ({
components: { YourComponent },
setup() {
return { args };
},
template: '<YourComponent v-bind="args" />',
}),
args: {
//👇 The args you need here will depend on your component
},
};
```