Viewport addon not working as expected
See original GitHub issueDescribe the bug After registering the addon it’s icon shows up in the storybook window but the behavior is odd. Whenever I try to chose a viewport I end up with the same thing.
To Reproduce Steps to reproduce the behavior:
- Install the addon
yarn add -D @storybook/addon-viewport
- Register it in
addons.js
import '@storybook/addon-viewport/register';
- Create a story:
import React from 'react';
import { storiesOf } from '@storybook/react';
import ActionDialog from './index';
storiesOf('ActionDialog', module).add('default', () => (
<ActionDialog>Dialog Content</ActionDialog>
));
- Run storybook
Expected behavior The viewport setting resizes the viewport as shown in the print in the Readme.
Actual behavior With no breakpoints selected (this is correct)
With any breakpoint selected (in this case, iphone6)
Notice that it changes the size of the viewport (see scrollbar on the right) but not to the expected size.
System:
- OS: Ubuntu 16.04
- Device: Desktop
- Browser: chrome
- Framework: react
- Addons: breakpoint
- Version: 5.0.6
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Viewport addon not working as expected · Issue #6392
Describe the bug After registering the addon it's icon shows up in the storybook window but the behavior is odd.
Read more >Storybook's viewport-addon not showing custom ...
I'm having troubles getting Storybook to display my set of viewports, it instead displays the MINIMAL_VIEWPORTS
Read more >⚓ T100380 Pie View Menu not working in Edit mode
Worked : (newest version of Blender that worked as expected). Addon Information Name: 3D Viewport Pie Menus (1, 2, 9) Author: meta-androcto.
Read more >Stop resizing your browser — Storybook viewport - YouTube
Viewports. They take your perfect layout and force them into constraints you didn't plan for…Fortunately, Storybook has you covered.
Read more >Visual Regression Testing and React Storybook
Thus all the styling should work as expected for different consumer of ... And last but not least, you can make use of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys, I apologize: it’s my mistake, I fixed zoom and broke background addon. I create PR to fix my past mistakes. 🔝
I’ll check it today. Give me a few hours. 👍