Remove CSS baseline from UnifiedThemeProvider
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import CssBaseline from '@material-ui/core/CssBaseline';
|
||||
import {
|
||||
ThemeProvider,
|
||||
StylesProvider,
|
||||
@@ -68,7 +67,7 @@ import { useApplyThemeAttributes } from './useApplyThemeAttributes';
|
||||
export function UnifiedThemeProvider(
|
||||
props: UnifiedThemeProviderProps,
|
||||
): JSX.Element {
|
||||
const { children, theme, noCssBaseline = false } = props;
|
||||
const { children, theme } = props;
|
||||
|
||||
const v4Theme = theme.getTheme('v4') as Mui4Theme;
|
||||
const v5Theme = theme.getTheme('v5') as Mui5Theme;
|
||||
@@ -78,17 +77,7 @@ export function UnifiedThemeProvider(
|
||||
'backstage',
|
||||
);
|
||||
|
||||
let cssBaseline: JSX.Element | undefined = undefined;
|
||||
if (!noCssBaseline) {
|
||||
cssBaseline = <CssBaseline />;
|
||||
}
|
||||
|
||||
let result = (
|
||||
<>
|
||||
{cssBaseline}
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
let result = children as JSX.Element;
|
||||
|
||||
if (v4Theme) {
|
||||
result = (
|
||||
|
||||
Reference in New Issue
Block a user