mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:52:07 +08:00
23 lines
582 B
Plaintext
23 lines
582 B
Plaintext
```md
|
|
<!-- Button.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { Button } from './Button';
|
|
|
|
<Meta title="Components/Button" component={Button}/>
|
|
|
|
<!-- The render function is a framework specific construct to define how the story should render -->
|
|
|
|
<Story
|
|
name="Primary"
|
|
render={()=><Button backgroundColor="#ff0" label="Button" />} />
|
|
|
|
<Story
|
|
name="Secondary"
|
|
render={()=><Button backgroundColor="#ff0" label="😄👍😍💯" />} />
|
|
|
|
<Story
|
|
name="Tertiary"
|
|
render={()=><Button backgroundColor="#ff0" label="📚📕📈🤓" />} />
|
|
``` |