1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-04-05 07:31:19 +08:00

5 Commits

Author SHA1 Message Date
Tom Coleman
6dfa51a6ef ADD some better upgrade messages 2019-03-04 12:30:44 +11:00
Norbert de Langen
f940f87490
REFACTOR viewports to use addParameters & only render tool 2018-12-06 12:02:21 +01:00
Mohamed Shaaban
33a38ef619 viewport-addon: configure => configureViewport 2018-04-14 18:33:48 +02:00
Mohamed Shaaban
d3046596ba Allow setting custom default viewport per story
Fix linting issues
2018-03-20 00:51:41 +01:00
Mohamed Shaaban
9b1370f3d6 Add support to configure viewport addon
- By default, viewport addon is reading both initial viewports' set and default viewport from
`INITIAL_VIEWPORTS` and `DEFAULT_VIEWPORT` respectively which are exported by the addon
 - `configure` function is exported which accepts an object with `defaultViewport` and `viewports`
 - Change the default viewport by setting `defaultViewport` property to the key of the viewport (e.g. `configure({ defaultViewport: 'iphone5' })`)
 - Replace the entire viewports by setting brand new viewports to `viewports` property (e.g. `configure({ viewports: { brandNewDevice: { ... } } })`)
 - Add custom viewports by first merging both the `INITIAL_VIEWPORTS` and your custom viewports, and then pass the result as `viewports` to configure function
2018-03-20 00:50:22 +01:00