mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
24 lines
472 B
Plaintext
24 lines
472 B
Plaintext
```md
|
|
<!-- Button.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { Button } from './Button';
|
|
|
|
<!-- 👇 Creates specific parameters for the story -->
|
|
<Meta
|
|
title="Components/Button"
|
|
component={Button}
|
|
parameters={{
|
|
backgrounds: {
|
|
values: [
|
|
{ name: 'red', value: '#f00' },
|
|
{ name: 'green', value: '#0f0' },
|
|
{ name: 'blue', value: '#00f' },
|
|
],
|
|
},
|
|
}}
|
|
/>
|
|
|
|
<!-- Your story implmentation -->
|
|
``` |