Skip to content

Commit

Permalink
Added custom field for global header bgColor
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay committed Feb 7, 2025
1 parent 10ab3b5 commit 5fb63e1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/themes/rhdh/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const components = (themeConfig: ThemeConfig): Components => {
components.MuiAppBar = {
styleOverrides: {
root: {
backgroundColor: general.sidebarBackgroundColor,
backgroundColor: general.globalHeaderBackgroundColor ?? general.sidebarBackgroundColor,
backgroundImage: "none",
},
},
Expand Down Expand Up @@ -157,6 +157,11 @@ export const components = (themeConfig: ThemeConfig): Components => {
"&:hover": {
backgroundColor: "transparent",
},
"&:disabled": {
color: general.disabled,
backgroudColor: general.disabledBackground,
border: `1px solid ${general.disabledBackground}`,
},
},
outlinedPrimary: {
"&:hover": {
Expand Down Expand Up @@ -478,7 +483,7 @@ export const components = (themeConfig: ThemeConfig): Components => {
styleOverrides: {
drawer: {
backgroundColor:
general.sidebarBackgroundColor ?? general.sidebarBackgroundColor,
general.sidebarBackgroundColor ?? general.sideBarBackgroundColor,
'& a[class*="BackstageSidebarItem-selected-"]': {
backgroundColor: general.sidebarItemSelectedBackgroundColor,
},
Expand Down
1 change: 1 addition & 0 deletions src/themes/rhdh/darkTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const customDarkTheme = (): ThemeConfigPalette => {
tableBackgroundColor: "#1b1d21",
tabsBottomBorderColor: "#444548",
contrastText: "#FFF",
globalHeaderBackgroundColor: "#1b1d21",
},
primary: {
main: "#1FA7F8",
Expand Down
1 change: 1 addition & 0 deletions src/themes/rhdh/lightTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const customLightTheme = (): ThemeConfigPalette => {
tableBackgroundColor: "#FFF",
tabsBottomBorderColor: "#D2D2D2",
contrastText: "#FFF",
globalHeaderBackgroundColor: "#212427",
},
primary: {
main: "#0066CC",
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface RHDHThemePalette {
tableBackgroundColor: string;
tabsBottomBorderColor: string;
contrastText: string;
globalHeaderBackgroundColor: string;
};

primary: {
Expand Down

0 comments on commit 5fb63e1

Please sign in to comment.