storybook/docs/snippets/angular/list-story-reuse-data.ts.mdx
2021-03-09 15:26:53 +00:00

21 lines
561 B
Plaintext

```ts
// List.stories.ts
//👇 We're importing the necessary stories from ListItem
import { Selected, Unselected } from './ListItem.stories';
export const ManyItems: Story<List> = (args) => ({
props: args,
template: `
<app-list>
<app-listitem [itemProperty]="Selected"></app-listitem>
<app-listitem [itemProperty]="Unselected"></app-listitemm>
<app-listitem[itemProperty]="Unselected"></app-listitem>
</app-list>`,
});
ManyItems.args= {
Selected: Selected.args.itemProperty,
Unselected: Unselected.args.itemProperty,
};
```