Set theme to dark

This commit is contained in:
2024-05-18 09:26:18 +04:00
parent 9b4bcc1edb
commit da5e8f0db0
2 changed files with 16 additions and 0 deletions
+2
View File
@@ -4,6 +4,7 @@ import '@fontsource/roboto/300.css'
import '@fontsource/roboto/400.css' import '@fontsource/roboto/400.css'
import '@fontsource/roboto/500.css' import '@fontsource/roboto/500.css'
import '@fontsource/roboto/700.css' import '@fontsource/roboto/700.css'
import CssBaseline from '@mui/material/CssBaseline'
import theme from '../src/theme.js' import theme from '../src/theme.js'
export default function RootLayout({children}) { // eslint-disable-line react/prop-types export default function RootLayout({children}) { // eslint-disable-line react/prop-types
@@ -12,6 +13,7 @@ export default function RootLayout({children}) { // eslint-disable-line react/pr
<body> <body>
<AppRouterCacheProvider> <AppRouterCacheProvider>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<CssBaseline />
{children} {children}
</ThemeProvider> </ThemeProvider>
</AppRouterCacheProvider> </AppRouterCacheProvider>
+14
View File
@@ -2,6 +2,7 @@
import {Roboto} from 'next/font/google' import {Roboto} from 'next/font/google'
import {createTheme} from '@mui/material/styles' import {createTheme} from '@mui/material/styles'
import {grey} from '@mui/material/colors'
const roboto = Roboto({ // eslint-disable-line new-cap const roboto = Roboto({ // eslint-disable-line new-cap
weight: ['300', '400', '500', '700'], weight: ['300', '400', '500', '700'],
@@ -13,6 +14,19 @@ const theme = createTheme({
typography: { typography: {
fontFamily: roboto.style.fontFamily, fontFamily: roboto.style.fontFamily,
}, },
palette: {
mode: 'dark',
primary: grey,
divider: grey[700],
background: {
default: grey[900],
paper: grey[800],
},
text: {
primary: '#fff',
secondary: grey[500],
},
},
}) })
export default theme export default theme