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

43 lines
812 B
Plaintext

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