storybook/docs/snippets/common/component-story-custom-params.mdx.mdx
2022-07-07 19:26:21 +01:00

26 lines
500 B
Plaintext

```md
<!-- Button.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import { Button } from './Button';
<Meta title="Button" component={Button} />
<Story
name="Primary"
parameters={{
backgrounds: {
values: [
{ name: 'red', value: '#f00' },
{ name: 'green', value: '#0f0' },
{ name: 'blue', value: '#00f' },
],
},
}}
args={{
primary: true,
label: 'Button',
}}
render={() => ({ // Your implementation here })} />
```