Fix toggle theme

This commit is contained in:
2024-10-21 15:18:37 +04:00
parent 011a5b64e2
commit c3993f7a5b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
'use client' 'use client'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import {extendTheme, ThemeProvider} from '@mui/material/styles' import {createTheme, ThemeProvider} from '@mui/material/styles'
import InitColorSchemeScript from '@mui/material/InitColorSchemeScript' import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'
import CssBaseline from '@mui/material/CssBaseline' import CssBaseline from '@mui/material/CssBaseline'
@@ -17,7 +17,7 @@ import PlausibleProvider from 'next-plausible'
import ChanjeTem from '../components/chanje-tem' import ChanjeTem from '../components/chanje-tem'
import NextAppDirEmotionCacheProvider from './emotion-cache-provider' import NextAppDirEmotionCacheProvider from './emotion-cache-provider'
const theme = extendTheme({ const theme = createTheme({
colorSchemes: { colorSchemes: {
light: { light: {
palette: { palette: {
+2 -2
View File
@@ -30,9 +30,9 @@ const Root = styled('div')((
padding: theme.spacing(1, 2), padding: theme.spacing(1, 2),
marginTop: 'auto', marginTop: 'auto',
backgroundColor: theme.palette.grey[100], backgroundColor: theme.palette.grey[100],
[theme.getColorSchemeSelector('dark')]: { ...theme.applyStyles('dark', {
backgroundColor: '#1E3526' backgroundColor: '#1E3526'
} })
}, },
[`& .${classes.text}`]: { [`& .${classes.text}`]: {