Shorter white flash when changing stories

This commit is contained in:
Joseph Garrone 2024-06-03 23:40:33 +02:00
parent dd770cd7c6
commit 776d8378e3

View File

@ -62,11 +62,18 @@ export function DocsContainer({ children, context }) {
export function CanvasContainer({ children }) {
const isStorybookUiDark = useDarkMode();
const theme = isStorybookUiDark ? darkTheme : lightTheme;
const backgroundColor = theme.appBg;
return (
<>
<style>{`
body {
padding: 0 !important;
background-color: ${backgroundColor};
}
`}</style>
{children}