mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
46 lines
818 B
Plaintext
46 lines
818 B
Plaintext
```js
|
|
// Button.stories.js | Button.stories.jsx | Button.stories.ts | Button.stories.tsx
|
|
|
|
import { Button } from './Button';
|
|
|
|
import CustomMDXDocumentation from './Custom-MDX-Documentation.mdx';
|
|
|
|
export default {
|
|
//👇 The title property is optional, if you don't include it within your story you'll have to adjust the story id in the custom page
|
|
title: 'Example/Button',
|
|
component: Button,
|
|
argTypes: {
|
|
backgroundColor: { control: 'color' },
|
|
},
|
|
parameters: {
|
|
docs: {
|
|
page: CustomMDXDocumentation,
|
|
},
|
|
},
|
|
};
|
|
|
|
export const Primary = {
|
|
args:{
|
|
backgroundColor: 'primary',
|
|
},
|
|
};
|
|
|
|
export const Secondary = {
|
|
args:{
|
|
backgroundColor: 'secondary',
|
|
},
|
|
};
|
|
|
|
export const Large = = {
|
|
args:{
|
|
size:'large',
|
|
}
|
|
};
|
|
|
|
export const Small = {
|
|
args:{
|
|
size:'small',
|
|
},
|
|
};
|
|
```
|