storybook/docs/snippets/vue/list-story-expanded.js.mdx
2023-11-27 20:57:51 -07:00

45 lines
809 B
Plaintext

```js
// List.stories.js
import List from './ListComponent.vue';
import ListItem from './ListItem.vue';
export default {
component: List,
};
/*
*👇 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 Empty = {
render: () => ({
components: { List },
template: '<List/>',
}),
};
export const OneItem = {
render: () => ({
components: { List, ListItem },
template: `
<List>
<list-item/>
</List>`,
}),
};
export const ManyItems = {
render: () => ({
components: { List, ListItem },
template: `
<List>
<list-item/>
<list-item/>
<list-item/>
</List>`,
}),
};
```