2021-02-13 13:21:47 +01:00
|
|
|
```js
|
2021-11-04 21:07:00 +00:00
|
|
|
// Button.stories.js|jsx|ts|tsx
|
2021-02-13 13:21:47 +01:00
|
|
|
|
2021-09-03 23:31:04 +01:00
|
|
|
import { Button } from './Button';
|
|
|
|
|
2021-02-13 13:21:47 +01:00
|
|
|
export default {
|
2021-11-09 01:41:54 +00:00
|
|
|
/* 👇 The title prop is optional.
|
2022-07-07 19:26:21 +01:00
|
|
|
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
|
|
|
|
* to learn how to generate automatic titles
|
|
|
|
*/
|
2021-11-04 21:07:00 +00:00
|
|
|
title: 'Button',
|
2021-02-13 13:21:47 +01:00
|
|
|
component: Button,
|
|
|
|
argTypes: {
|
|
|
|
variant: {
|
2021-05-21 11:29:00 +02:00
|
|
|
options: ['primary', 'secondary'],
|
2021-08-28 01:52:57 +01:00
|
|
|
control: { type: 'radio' },
|
|
|
|
},
|
|
|
|
},
|
2021-02-13 13:21:47 +01:00
|
|
|
};
|
2022-11-17 15:08:18 +01:00
|
|
|
```
|