storybook/docs/snippets/vue/list-story-reuse-data.js.mdx
2020-12-23 17:00:49 +00:00

20 lines
487 B
Plaintext

```js
// List.stories.js
import List from './ListComponent.vue';
import ListItem from './ListItem.vue';
import { Selected, Unselected } from './ListItem.stories';
export const ManyItems = (args, { argTypes }) => ({
components: { List, ListItem },
props: Object.keys(argTypes),
template: `
<list v-bind="$props">
<list-item :itemProperty="Selected"/>
<list-item :itemProperty="Unselected"/>
<list-item :itemProperty="Unselected"/>
</list>
`,
});
```