storybook/docs/snippets/vue/list-story-unchecked.3.js.mdx
2021-08-28 01:52:57 +01:00

28 lines
551 B
Plaintext

```js
// List.stories.js
import List from './List.vue';
import ListItem from './ListItem.vue';
//👇 Imports a specific story from ListItem stories
import { Unchecked } from './ListItem.stories';
export default {
component: List,
};
export const OneItem = {
args: {
...Unchecked.args,
},
render: (args) => ({
components: { List, ListItem },
setup() {
//👇 The args will now be passed down to the template
return { args };
},
template: '<List v-bind="args"><ListItem v-bind="args"/></List>',
}),
};
```