storybook/docs/snippets/common/button-story-docspage-with-mdx.js.mdx
2021-09-06 22:03:15 +01:00

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',
},
};
```