mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 09:22:09 +08:00
20 lines
369 B
Plaintext
20 lines
369 B
Plaintext
```js
|
|
// List.stories.js
|
|
|
|
import { List, ListProps } from './List';
|
|
import { ListItem, ListItemProps } from './ListItem';
|
|
|
|
export default {
|
|
component: List,
|
|
subcomponents: [ListItem],
|
|
title: 'List',
|
|
};
|
|
|
|
export const Empty = Story<ListProps> = (args) => <List {...args} />;;
|
|
|
|
export const OneItem = (args) => (
|
|
<List {...args}>
|
|
<ListItem />
|
|
</List>
|
|
);
|
|
``` |