mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 19:51:49 +08:00
23 lines
544 B
Plaintext
23 lines
544 B
Plaintext
```ts
|
|
// List.stories.ts|tsx
|
|
|
|
import React from 'react';
|
|
|
|
import type { ComponentStoryObj, ComponentMeta } from '@storybook/react';
|
|
|
|
import { List } from './List';
|
|
|
|
export default {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'List',
|
|
component: List,
|
|
} as ComponentMeta<typeof List>;
|
|
|
|
//👇 Always an empty list, not super interesting
|
|
|
|
const Template: ComponentStoryObj<typeof List> = {};
|
|
```
|