-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix display of large components #1237
Conversation
Add CSS to allow for oversized components to scroll in all directions. See [issue storybookjs#1225](storybookjs#1225 (comment)).
Codecov Report
@@ Coverage Diff @@
## master #1237 +/- ##
=======================================
Coverage 14.35% 14.35%
=======================================
Files 201 201
Lines 4612 4612
Branches 504 498 -6
=======================================
Hits 662 662
- Misses 3516 3518 +2
+ Partials 434 432 -2
Continue to review full report at Codecov.
|
export default function(storyFn) { | ||
return <div style={style}>{storyFn()}</div>; | ||
return <div style={style}><div style={innerStyle}>{storyFn()}</div></div>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding another container defeats the purpose of the centered addon, I'll have to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to test this? I'd be happy to try to improve the fix if this proves to have problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test this
It works wonders! Thanks you, you are awesome @su-narthur! Sorry it took so long to view and merge, totally my fault! |
Add CSS to allow for oversized components to scroll in all directions. See issue #1225.
Issue: Overflowing portions of large components are inaccessible when using Centered plugin.
What I did
I added
overflow: auto
to the outer wrapper andmargin: auto
to a new inner wrapper.How to test
Create a component larger than your viewport and check that you can stroll both up and down to see the entire component.