storybook/docs/snippets/angular/my-component-story-configure-viewports.mdx.mdx
2021-11-09 01:41:54 +00:00

31 lines
555 B
Plaintext

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