Skip to content

Commit

Permalink
Merge pull request #211 from TouK/NU-1646-new-colors-adjustements
Browse files Browse the repository at this point in the history
NU-1646 new colors adjustments and fix form styles
  • Loading branch information
Dzuming authored May 14, 2024
2 parents 2303015 + 867cbf4 commit 1f39bc2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/components/root.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { Box, CssBaseline, ThemeProvider } from "@mui/material";
import { Box, CssBaseline, Theme, ThemeProvider } from "@mui/material";
import React from "react";
import { BrowserRouter as Router } from "react-router-dom";
import { RootRoutes } from "./routes";
import { theme } from "./theme";
import { deepmerge } from "@mui/utils";

export const Root = () => {
return (
<ThemeProvider theme={theme}>
<ThemeProvider theme={(outerTheme: Theme) => {
if(!Object.keys(outerTheme).length) {
return theme
}

// Let's set aside the parent form style since we won't be using the same form style throughout the entire app.
const {components: {MuiFormControl, MuiFormHelperText, MuiFormLabel}, ...filteredOuterTheme} = outerTheme

return deepmerge(theme, filteredOuterTheme )

}}>
<CssBaseline />
<Box minHeight="100vh" display="flex" flex={1}>
<Router>
Expand Down
16 changes: 16 additions & 0 deletions src/components/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,20 @@ export const theme = createMuiTheme({
paper: "#4D4D4D",
},
},
components: {
MuiListItemIcon: {
styleOverrides: {
root: {
color: 'currentColor',
}
}
},
MuiIconButton: {
styleOverrides: {
root: ({ theme }) => ({
color: theme.palette.primary.main,
})
}
},
}
});

0 comments on commit 1f39bc2

Please sign in to comment.