mirror of
https://github.com/D4M13N-D3V/comissions-app-ui.git
synced 2025-03-14 08:15:08 +00:00
59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
// ** MUI Theme Provider
|
|
import { deepmerge } from '@mui/utils'
|
|
import { ThemeOptions } from '@mui/material'
|
|
|
|
// ** Type Import
|
|
import { Settings } from '../core/context/settingsContext'
|
|
|
|
// ** Theme Override Imports
|
|
import palette from './palette'
|
|
import spacing from './spacing'
|
|
import shadows from './shadows'
|
|
import breakpoints from './breakpoints'
|
|
|
|
const themeOptions = (settings: Settings): ThemeOptions => {
|
|
// ** Vars
|
|
const { mode, themeColor } = settings
|
|
|
|
const themeConfig = {
|
|
palette: palette(mode, themeColor),
|
|
typography: {
|
|
fontFamily: [
|
|
'Inter',
|
|
'sans-serif',
|
|
'-apple-system',
|
|
'BlinkMacSystemFont',
|
|
'"Segoe UI"',
|
|
'Roboto',
|
|
'"Helvetica Neue"',
|
|
'Arial',
|
|
'sans-serif',
|
|
'"Apple Color Emoji"',
|
|
'"Segoe UI Emoji"',
|
|
'"Segoe UI Symbol"'
|
|
].join(',')
|
|
},
|
|
shadows: shadows(mode),
|
|
...spacing,
|
|
breakpoints: breakpoints(),
|
|
shape: {
|
|
borderRadius: 6
|
|
},
|
|
mixins: {
|
|
toolbar: {
|
|
minHeight: 64
|
|
}
|
|
}
|
|
}
|
|
|
|
return deepmerge(themeConfig, {
|
|
palette: {
|
|
primary: {
|
|
...themeConfig.palette[themeColor]
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
export default themeOptions
|