mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 23:02:00 +08:00
22 lines
487 B
Plaintext
22 lines
487 B
Plaintext
```md
|
|
<!-- Button.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { Button } from './Button';
|
|
|
|
<Meta title="Button" component={Button} />
|
|
|
|
<!--
|
|
👇 Render functions are a framework specific feature to allow you control on how the component renders.
|
|
See https://storybook.js.org/docs/7.0/react/api/csf
|
|
to learn how to use render functions.
|
|
-->
|
|
|
|
<Story
|
|
name="Basic"
|
|
args={{
|
|
label: 'hello'
|
|
}}
|
|
render={(args)=> <Button {...args} />} />
|
|
``` |