storybook/docs/snippets/react/list-story-reuse-data.ts.mdx
2021-06-28 23:00:33 +01:00

16 lines
405 B
Plaintext

```ts
// List.stories.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>
);
```