mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storybook: use div #root styles on storybook preview instead of additional div wrapper (#55023)
* feat: use styles on #root div instead of additionnal div wrapper * Update packages/grafana-ui/src/utils/storybook/withTheme.tsx Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
parent
801b61c963
commit
fb59702c74
@ -16,20 +16,19 @@ const ThemeableStory: React.FunctionComponent<{ handleSassThemeChange: SassTheme
|
||||
|
||||
handleSassThemeChange(theme);
|
||||
|
||||
const css = `#root {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
min-height: 100%;
|
||||
background: ${theme.colors.background.primary};
|
||||
}`;
|
||||
|
||||
return (
|
||||
<ThemeContext.Provider value={theme}>
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
padding: '20px',
|
||||
display: 'flex',
|
||||
minHeight: '100%',
|
||||
background: `${theme.colors.background.primary}`,
|
||||
}}
|
||||
>
|
||||
<GlobalStyles />
|
||||
{children}
|
||||
</div>
|
||||
<GlobalStyles />
|
||||
<style>{css}</style>
|
||||
{children}
|
||||
</ThemeContext.Provider>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user