storybook/docs/snippets/react/list-story-expanded.ts.mdx
Norbert de Langen 84a4bde3f0
FIX
2020-12-09 14:42:24 +01:00

29 lines
543 B
Plaintext

```ts
// List.stories.tsx
import React from 'react';
import { Story, Meta } from '@storybook/react';
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>
);
```