Skip to content

Commit

Permalink
Merge pull request #19086 from storybookjs/norbert/sb-580-addon-viewport
Browse files Browse the repository at this point in the history
Addon-viewport: Move stories into addon
  • Loading branch information
shilman authored Sep 2, 2022
2 parents 7f4c7a3 + 0880c84 commit 9e5d3e0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 119 deletions.
50 changes: 50 additions & 0 deletions code/addons/viewport/template/stories/parameters.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import globalThis from 'global';
import { MINIMAL_VIEWPORTS } from '@storybook/addon-viewport';

export default {
component: globalThis.Components.Button,
args: {
children: 'Click Me!',
},
parameters: {
viewport: {
viewports: MINIMAL_VIEWPORTS,
},
chromatic: { disable: true },
},
};

export const Basic = {
parameters: {},
};

export const Selected = {
parameters: {
viewport: {
defaultViewport: Object.keys(MINIMAL_VIEWPORTS)[0],
},
},
};

export const Custom = {
parameters: {
viewport: {
viewports: {
phone: {
name: 'Phone Width',
styles: {
height: '600px',
width: '100vh',
},
type: 'mobile',
},
},
},
},
};

export const Disabled = {
parameters: {
viewport: { disable: true },
},
};

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 9e5d3e0

Please sign in to comment.