storybook/docs/snippets/react/button-story-with-parameters.js.mdx
2021-06-28 23:00:33 +01:00

21 lines
377 B
Plaintext

```js
// Button.stories.js | Button.stories.jsx
import React from 'react';
import Button from './Button';
export default {
title: 'Button',
component: Button,
//👇 Creates specific parameters for the story
parameters: {
backgrounds: {
values: [
{ name: 'red', value: '#f00' },
{ name: 'green', value: '#0f0' },
],
},
},
};
```