After upgrading from Storybook 5 to Storybook 6 I experienced some annoying padding around all my stories.
The inspector told me this was due to a padding of 1rem defined in the class name sb-show-main on the body element. I searched for how to override this class, but was totally not necessary. The solution was actually quite simple, by adding just the following snippet to .storybook/preview.js:
export const parameters = {
layout: 'fullscreen',
};
Top comments (7)
You can also use this on a component basis
Thanks for pointing me in the right direction
Thank you for sharing this!
This issue was starting to annoy me. Thank you for sharing this!
Thanks!!!
Wow, this was exactly the problem I wanted to fix. Thank you so much.
Thank you! Super useful.
Thank you!