Remove padding from storybook
Tom
Posted on November 13, 2020
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',
};
💖 💪 🙅 🚩
Tom
Posted on November 13, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
javascript Sortie de TypeScript 5.7 RC, nouvelle alternative à npm, avenir des frameworks JavaScript - Cette semaine en JS
November 26, 2024