Skip to content

Commit abbbe15

Browse files
committed
fix nav and tab color
1 parent 0976f81 commit abbbe15

File tree

4 files changed

+61
-10
lines changed

4 files changed

+61
-10
lines changed

.changeset/sweet-colts-exercise.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'app': minor
3+
---
4+
5+
updated Nav and tab styles to match PatternFly5.
+46-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { UnifiedThemeOptions } from '@backstage/theme';
2+
import { ThemeColors } from '../types/types';
23

34
const redhatFont = `@font-face {
45
font-family: 'Red Hat Font';
@@ -10,8 +11,49 @@ const redhatFont = `@font-face {
1011
url(/fonts/RedHatText-Regular.ttf) format('truetype');
1112
}`;
1213

13-
export const components: UnifiedThemeOptions['components'] = {
14-
MuiCssBaseline: {
15-
styleOverrides: redhatFont,
16-
},
14+
export const components = (
15+
themeColors: ThemeColors,
16+
): UnifiedThemeOptions['components'] => {
17+
return {
18+
MuiTabs: {
19+
defaultProps: {
20+
TabIndicatorProps: {
21+
style: {
22+
height: '3px',
23+
background: themeColors.navigationIndicatorColor || '#0066CC',
24+
},
25+
},
26+
},
27+
styleOverrides: {
28+
root: {
29+
borderBottom: '1px solid #d2d2d2',
30+
},
31+
},
32+
},
33+
MuiTab: {
34+
defaultProps: {
35+
disableRipple: true,
36+
},
37+
styleOverrides: {
38+
root: {
39+
minWidth: 'auto',
40+
},
41+
disabled: {
42+
backgroundColor: '#6a6e73',
43+
},
44+
},
45+
},
46+
MuiButtonBase: {
47+
styleOverrides: {
48+
root: {
49+
'&:hover': {
50+
boxShadow: '0 -3px #b8bbbe inset',
51+
},
52+
},
53+
},
54+
},
55+
MuiCssBaseline: {
56+
styleOverrides: redhatFont,
57+
},
58+
};
1759
};

packages/app/src/themes/darkTheme.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export const customDarkTheme = (themeColors: ThemeColors) =>
1515
}),
1616
navigation: {
1717
background: '#0f1214',
18-
indicator: themeColors.navigationIndicatorColor || '#009596',
18+
indicator: themeColors.navigationIndicatorColor || '#0066CC',
1919
color: '#ffffff',
2020
selectedColor: '#ffffff',
2121
navItem: {
22-
hoverBackground: '#030303',
22+
hoverBackground: '#3c3f42',
2323
},
2424
},
2525
},
2626
defaultPageTheme: 'home',
2727
pageTheme: pageTheme(themeColors),
28-
components,
28+
components: components(themeColors),
2929
});

packages/app/src/themes/lightTheme.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@ export const customLightTheme = (themeColors: ThemeColors) =>
1515
}),
1616
navigation: {
1717
background: '#222427',
18-
indicator: themeColors.navigationIndicatorColor || '#009596',
18+
indicator: themeColors.navigationIndicatorColor || '#0066CC',
1919
color: '#ffffff',
2020
selectedColor: '#ffffff',
2121
navItem: {
22-
hoverBackground: '#4f5255',
22+
hoverBackground: '#3c3f42',
2323
},
2424
},
25+
text: {
26+
primary: '#151515',
27+
secondary: '#757575',
28+
},
2529
},
2630
defaultPageTheme: 'home',
2731
pageTheme: pageTheme(themeColors),
28-
components,
32+
components: components(themeColors),
2933
});

0 commit comments

Comments
 (0)