mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
22 lines
401 B
Plaintext
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 -->
|
|
``` |