zucchetti-sa5/themes/onepirate/modules/withRoot.js

19 lines
503 B
JavaScript
Raw Permalink Normal View History

2022-10-28 11:41:58 +02:00
import * as React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import theme from './theme';
export default function withRoot(Component) {
function WithRoot(props) {
return (
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
<Component {...props} />
</ThemeProvider>
);
}
return WithRoot;
}