storybook/docs/snippets/react/button-story-with-args.mdx.mdx
2021-08-09 19:19:01 +01:00

21 lines
351 B
Plaintext

```md
<!-- Button.stories.mdx-->
import { Meta, Story } from '@storybook/addon-docs';
import { Button } from './Button';
<Meta title="Components/Button" component={Button} />
export const Template = (args) => <Button {...args} />;
<Story
name="Primary"
args={{
primary: true,
label: 'Button',
}}>
{Template.bind({})}
</Story>
```