storybook/docs/snippets/svelte/my-component-story-configure-viewports.mdx.mdx
2021-08-09 19:19:01 +01:00

33 lines
530 B
Plaintext

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