mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:11:49 +08:00
27 lines
668 B
Plaintext
27 lines
668 B
Plaintext
```js
|
|
// List.stories.js
|
|
|
|
import List from './ListComponent.vue';
|
|
import ListItem from './ListItem.vue';
|
|
|
|
//👇 We're importing the necessary stories from ListItem
|
|
import { Selected, Unselected } from './ListItem.stories';
|
|
|
|
export const ManyItems = {
|
|
args: {
|
|
Selected: Selected.args.isSelected,
|
|
Unselected: Unselected.args.isSelected,
|
|
},
|
|
render: (args, { argTypes }) => ({
|
|
components: { List, ListItem },
|
|
props: Object.keys(argTypes),
|
|
template: `
|
|
<List v-bind="$props">
|
|
<list-item :isSelected="Selected"/>
|
|
<list-item :isSelected="Unselected"/>
|
|
<list-item :isSelected="Unselected"/>
|
|
</List>`,
|
|
}),
|
|
};
|
|
```
|