storybook/docs/snippets/react/button-story-with-args.mdx.mdx
2021-10-12 21:52:15 +01:00

20 lines
417 B
Plaintext

```md
<!-- Button.stories.mdx-->
import { Meta, Story } from '@storybook/addon-docs';
import { Button } from './Button';
<Meta title="Components/Button" component={Button} />
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
<Story
name="Primary"
args={{
primary: true,
label: 'Button',
}}
render={(args) => <Button {...args} />} />
```