storybook/docs/snippets/common/component-story-custom-params.mdx.mdx
2021-08-08 18:33:11 +01:00

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>
```