mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:41:57 +08:00
29 lines
453 B
Plaintext
29 lines
453 B
Plaintext
```md
|
|
<!-- MyComponent.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
|
|
|
|
<Meta
|
|
title='Stories'
|
|
parameters={{
|
|
viewport: {
|
|
viewports: INITIAL_VIEWPORTS,
|
|
defaultViewport: 'iphone6',
|
|
},
|
|
}}
|
|
/>
|
|
|
|
<Story
|
|
name='MyStory'
|
|
parameters={{
|
|
viewport: {
|
|
defaultViewport: 'iphonex',
|
|
}
|
|
}}>
|
|
{{
|
|
template: '<div></div>',
|
|
}}
|
|
</Story>
|
|
``` |