storybook/docs/snippets/react/list-story-expanded.ts.mdx
2020-08-07 17:05:17 +01:00

28 lines
527 B
Plaintext

```ts
// List.stories.ts
import { Story, Meta } from '@storybook/react/types-6-0';
import { List, ListProps } from './List';
import { ListItem, ListItemProps } from './ListItem';
export default {
component: List,
title: 'List',
} as Meta;
export const Empty = : Story<ListProps> = (args) => <List {...args} />;
export const OneItem = (args) => (
<List {...args}>
<ListItem />
</List>
);
export const ManyItems = (args) => (
<List {...args}>
<ListItem />
<ListItem />
<ListItem />
</List>
);
```