mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 03:11:05 +08:00
20 lines
383 B
Plaintext
20 lines
383 B
Plaintext
```md
|
|
<!-- MyComponent.stories.mdx -->
|
|
|
|
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import MyComponent from './MyComponent';
|
|
|
|
<Meta title="MyComponent" />
|
|
|
|
export const Template = (args) => <MyComponent {...args} />
|
|
|
|
<Canvas>
|
|
<Story
|
|
name="ExampleStory"
|
|
args={{
|
|
propertyA: process.env.STORYBOOK_DATA_KEY,
|
|
}}>
|
|
{Template.bind({})}
|
|
</Canvas>
|
|
``` |