/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/material-ui-nextjs-ts/src/theme.ts
37 строк
734 B
Derick M
[examples] Add Theme Mode Switch to Next.js TS example (#43576)
11 дек 2024, 09:28
Не верифицирован
11 дек 2024, 09:28
6497d21
Код
Авторство
О чём код?
'use client'; import { createTheme } from '@mui/material/styles'; import { Roboto } from 'next/font/google'; const roboto = Roboto({ weight: ['300', '400', '500', '700'], subsets: ['latin'], display: 'swap', }); const theme = createTheme({ colorSchemes: { light: true, dark: true }, cssVariables: { colorSchemeSelector: 'class', }, typography: { fontFamily: roboto.style.fontFamily, }, components: { MuiAlert: { styleOverrides: { root: { variants: [ { props: { severity: 'info' }, style: { backgroundColor: '#60a5fa', }, }, ], }, }, }, }, }); export default theme;