-
-
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
Merge pull request #9229 from storybookjs/core/preview-layouts #9229
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/e0wwmy3hp |
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 like the idea of a layout
option, but I'm not so keen on this implementation. I don't think we need memoization and I would really like to have the possibility to provide a callback instead of a value so we can determine the value based on the story context.
I would really like to champion this change as soon as I'm back at work.
I updated the branch, refactored some logic to avoid introducing a dependency and added support for layout based on story context. |
🎉 |
🎉🎉🎉 @ndelangen @ghengeveld is there a corresponding documentation and/or MIGRATION update that's missing? 🙏 |
@shilman YES, I think we should add some proper documentation for this. |
Trying to get this working on MDX with Vue. Is it supposed to look like this?
I'm using "next" (currently 6.0.0-alpha.18) for all Storybook packages. |
I'll investigate this @frebro |
Tried with your example in the PR above @ndelangen, and it works fine. Hartelijk bedankt! |
This adds support for a layout parameter: #8358 (comment)
The parameter has 3 possible values: 'padded' (default), 'fullscreen' & 'center'
Here's how you use it:
This allows users to specify whether they want padding or now, and also deprecates addon-centered, making it a core-feature