storybook/docs/snippets/common/button-story-docspage-with-mdx.js.mdx
jonniebigodes d29ac012f0
Merge pull request #15444 from RickCardoso/fix/docs-page-with-mdx-snippet
fix: docs-page with mdx and id explanation
2021-08-03 15:38:57 +01:00

28 lines
650 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 {
title: 'Example/Button',
component: Button,
argTypes: {
backgroundColor: { control: 'color' },
},
parameters: {
docs: {
page: CustomMDXDocumentation,
}
},
};
export const Primary = () => <Button backgroundColor="primary" />;
export const Secondary = () => <Button backgroundColor="secondary" />;
export const Large = () => <Button size="large" />;
export const Small = () => <Button size="small" />;
```