chore: set up MUI theme

This commit is contained in:
Jeremy Kahn 2022-08-09 21:41:39 -05:00
parent be4947a80b
commit da04fcf53b

View File

@ -1,18 +1,29 @@
import React from 'react' import React from 'react'
import ReactDOM from 'react-dom/client' import ReactDOM from 'react-dom/client'
import { BrowserRouter as Router } from 'react-router-dom' import { BrowserRouter as Router } from 'react-router-dom'
import { ThemeProvider, createTheme } from '@mui/material/styles'
import CssBaseline from '@mui/material/CssBaseline'
import * as serviceWorkerRegistration from './serviceWorkerRegistration' import * as serviceWorkerRegistration from './serviceWorkerRegistration'
import './index.sass' import './index.sass'
import Bootstrap from './Bootstrap' import Bootstrap from './Bootstrap'
import reportWebVitals from './reportWebVitals' import reportWebVitals from './reportWebVitals'
const darkTheme = createTheme({
palette: {
mode: 'dark',
},
})
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<ThemeProvider theme={darkTheme}>
<CssBaseline />
<Router> <Router>
<Bootstrap /> <Bootstrap />
</Router> </Router>
</ThemeProvider>
</React.StrictMode> </React.StrictMode>
) )