storybook/docs/snippets/react/list-story-reuse-data.ts.mdx
2021-02-23 00:26:03 +00:00

16 lines
387 B
Plaintext

```ts
// List.stories.tsx
import React from 'react';
//👇 All ListItem stories are imported
import * as ListItemStories from './ListItemStories';
export const ManyItems = (args) => (
<List {...args}>
<Selected {...ListItemStories.Selected.args} />
<Unselected {...ListItemStories.Unselected.args} />
<Unselected {...ListItemStories.Unselected.args} />
</List>
);
```