-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19086 from storybookjs/norbert/sb-580-addon-viewport
Addon-viewport: Move stories into addon
- Loading branch information
Showing
4 changed files
with
50 additions
and
119 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
code/addons/viewport/template/stories/parameters.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }, | ||
}, | ||
}; |
46 changes: 0 additions & 46 deletions
46
code/examples/official-storybook/stories/addon-viewport/custom-default.stories.js
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
code/examples/official-storybook/stories/addon-viewport/default.stories.js
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
...xamples/web-components-kitchen-sink/src/stories/addons/viewport/addon-viewport.stories.ts
This file was deleted.
Oops, something went wrong.