mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:11:49 +08:00
23 lines
392 B
Plaintext
23 lines
392 B
Plaintext
```md
|
|
<!-- Button.stories.mdx -->
|
|
|
|
import { Story } from '@storybook/addon-docs';
|
|
|
|
<Story
|
|
name='Primary'
|
|
parameters={{
|
|
backgrounds: {
|
|
values: [
|
|
{ name: 'red', value: '#f00' },
|
|
{ name: 'green', value: '#0f0' },
|
|
{ name: 'blue', value: '#00f' },
|
|
],
|
|
},
|
|
}}
|
|
args={{
|
|
primary: true,
|
|
label: 'Button',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
``` |