storybook/docs/snippets/react/my-component-story-configure-viewports.mdx.mdx
2021-05-07 11:51:52 +08:00

29 lines
358 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
<Meta
title='Stories'
parameters={{
viewport: {
viewports: MINIMAL_VIEWPORTS,
defaultViewport: 'iphone6'
},
}}
/>
<Story
name="MyStory"
parameters={{
viewport: {
defaultViewport: 'iphonex'
}
}}
>
<div />
</Story>
```