chore: set up MUI theme
This commit is contained in:
parent
be4947a80b
commit
da04fcf53b
@ -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>
|
||||||
<Router>
|
<ThemeProvider theme={darkTheme}>
|
||||||
<Bootstrap />
|
<CssBaseline />
|
||||||
</Router>
|
<Router>
|
||||||
|
<Bootstrap />
|
||||||
|
</Router>
|
||||||
|
</ThemeProvider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user