mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 00:21:24 +08:00
27 lines
642 B
Plaintext
27 lines
642 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) => ({
|
|
components: { List, ListItem },
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: `
|
|
<list v-bind="args">
|
|
<list-item :itemProperty="Selected"/>
|
|
<list-item :itemProperty="Unselected"/>
|
|
<list-item :itemProperty="Unselected"/>
|
|
</list>
|
|
`,
|
|
});
|
|
ManyItems.args = {
|
|
Selected: Selected.args.itemProperty,
|
|
Unselected: Unselected.args.itemProperty,
|
|
};
|
|
``` |