initThemes.js
1 import { createTheme } from '@mui/material'; 2 import { forEach, merge } from 'lodash'; 3 import { themeColors } from './themeColors'; 4 import themeOptions from './themeOptions'; 5 6 function createMatxThemes() { 7 let themes = {}; 8 9 forEach(themeColors, (value, key) => { 10 themes[key] = createTheme(merge({}, themeOptions, value)); 11 }); 12 13 return themes; 14 } 15 16 export const themes = createMatxThemes();