storybook/docs/snippets/react/my-component-story-configure-viewports.js.mdx
2020-08-14 21:46:15 +01:00

26 lines
461 B
Plaintext

```js
// MyComponent.stories.js
import React from 'react';
export default {
title: 'Stories',
parameters: {
// the viewports object from the Essentials addon
viewport: {
// the viewports you want to use
viewports: MINIMAL_VIEWPORTS,
// your own default viewport
defaultViewport: 'iphone6'
},
};
};
export const myStory = () => <div />;
myStory.parameters = {
viewport: {
defaultViewport: 'iphonex'
},
};
```