Shorter white flash when changing stories
This commit is contained in:
parent
dd770cd7c6
commit
776d8378e3
@ -62,11 +62,18 @@ export function DocsContainer({ children, context }) {
|
|||||||
|
|
||||||
export function CanvasContainer({ children }) {
|
export function CanvasContainer({ children }) {
|
||||||
|
|
||||||
|
const isStorybookUiDark = useDarkMode();
|
||||||
|
|
||||||
|
const theme = isStorybookUiDark ? darkTheme : lightTheme;
|
||||||
|
|
||||||
|
const backgroundColor = theme.appBg;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<style>{`
|
<style>{`
|
||||||
body {
|
body {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
background-color: ${backgroundColor};
|
||||||
}
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
{children}
|
{children}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user