Improve structure

This commit is contained in:
Nicola Benaglia 2025-04-18 19:39:17 +02:00
parent 69ff35b776
commit 22326411a0
2 changed files with 26 additions and 22 deletions

View File

@ -1,7 +1,7 @@
import { createTheme } from '@mui/material/styles';
import { createTheme, ThemeOptions } from '@mui/material/styles';
import { commonThemeOptions } from './theme-common';
const darkTheme = createTheme({
const darkThemeOptions: ThemeOptions = {
...commonThemeOptions,
palette: {
mode: 'dark',
@ -37,14 +37,6 @@ const darkTheme = createTheme({
},
},
},
MuiIcon: {
defaultProps: {
style: {
color: 'rgb(255, 255, 255)',
opacity: 0.5,
},
},
},
MuiCssBaseline: {
styleOverrides: {
':root': {
@ -76,7 +68,17 @@ const darkTheme = createTheme({
},
},
},
MuiIcon: {
defaultProps: {
style: {
color: 'rgb(255, 255, 255)',
opacity: 0.5,
},
},
},
},
});
};
const darkTheme = createTheme(darkThemeOptions);
export { darkTheme };

View File

@ -1,7 +1,7 @@
import { createTheme } from '@mui/material/styles';
import { createTheme, ThemeOptions } from '@mui/material/styles';
import { commonThemeOptions } from './theme-common';
const lightTheme = createTheme({
const lightThemeOptions: ThemeOptions = {
...commonThemeOptions,
palette: {
mode: 'light',
@ -38,14 +38,6 @@ const lightTheme = createTheme({
},
},
},
MuiIcon: {
defaultProps: {
style: {
color: 'rgba(0, 0, 0, 1)',
opacity: 0.5,
},
},
},
MuiCssBaseline: {
styleOverrides: {
':root': {
@ -77,7 +69,17 @@ const lightTheme = createTheme({
},
},
},
MuiIcon: {
defaultProps: {
style: {
color: 'rgba(0, 0, 0, 1)',
opacity: 0.5,
},
},
},
},
});
};
const lightTheme = createTheme(lightThemeOptions);
export { lightTheme };