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

17 lines
403 B
Plaintext

```ts
// List.stories.ts | List.stories.tsx
import React from 'react';
import { List, ListProps } from './List';
//👇 Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
const Template: Story<ListProps> = (args) => <List {...args} />;
export const OneItem = Template.bind({});
OneItem.args = {
children: <Unchecked {...Unchecked.args} />,
};
```