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

22 lines
401 B
Plaintext

```md
<!-- Button.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import { Button } from './Button';
<!-- 👇 Creates specific argTypes and turns all stories into primary -->
<Meta
title="Button"
component={Button}
argTypes={{
backgroundColor: {
control: 'color',
},
}},
args={{
primary: true,
}}/>
<!-- Remainder story implementation -->
```