Add theming boilerplate
This commit is contained in:
@ -2,9 +2,13 @@ import { StrictMode } from 'react'
|
|||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
import './index.css'
|
import './index.css'
|
||||||
import App from './App.tsx'
|
import App from './App.tsx'
|
||||||
|
import { CssVarsProvider } from '@mui/joy'
|
||||||
|
import theme from "./theme.ts";
|
||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<App />
|
<CssVarsProvider theme={theme}>
|
||||||
|
<App />
|
||||||
|
</CssVarsProvider>;
|
||||||
</StrictMode>,
|
</StrictMode>,
|
||||||
)
|
)
|
||||||
|
20
src/theme.ts
Normal file
20
src/theme.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { extendTheme } from '@mui/joy/styles';
|
||||||
|
|
||||||
|
|
||||||
|
declare module '@mui/joy/styles' {
|
||||||
|
// No custom tokens found, you can skip the theme augmentation.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const theme = extendTheme({
|
||||||
|
"colorSchemes": {
|
||||||
|
"light": {
|
||||||
|
"palette": {}
|
||||||
|
},
|
||||||
|
"dark": {
|
||||||
|
"palette": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export default theme;
|
Reference in New Issue
Block a user