storybook/docs/snippets/react/list-story-unchecked.ts-4-9.mdx
Kyle Gach df0bf8bce9 Revert "WIP: Update multiple components guidance"
This reverts commit dba4179e2f4ca8a9c8669ecd28f36ca41f449a08.
2024-04-01 08:58:57 -06:00

31 lines
680 B
Plaintext

```ts
// List.stories.ts|tsx
import type { Meta, StoryObj } from '@storybook/react';
import { List } from './List';
//👇 Instead of importing ListItem, we import the stories
import { Unchecked } from './ListItem.stories';
export const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'List',
component: List,
} satisfies Meta<typeof List>;
export default meta;
type Story = StoryObj<typeof meta>;
export const OneItem: Story = {
render: (args) => (
<List {...args}>
<Unchecked {...Unchecked.args} />
</List>
),
};
```