mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
18 lines
554 B
Plaintext
18 lines
554 B
Plaintext
```md
|
|
<!-- YourComponent.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { YourComponent } from './YourComponent';
|
|
|
|
<!--👇 The title prop determines where your story goes in the story list -->
|
|
<Meta title="YourComponent" component={YourComponent} />
|
|
|
|
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
|
|
|
|
<!-- 👇 The args you need here will depend on your component -->
|
|
<Story
|
|
name="FirstStory"
|
|
args={{}}
|
|
render={(args) => <YourComponent {...args} />} />
|
|
``` |