Skip to content

Commit d369688

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

File tree

5 files changed

+55
-13
lines changed

5 files changed

+55
-13
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.

packages/app/src/components/Root/Root.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ import { IconComponent, useApp } from '@backstage/core-plugin-api';
2929
const useStyles = makeStyles()({
3030
sidebarItem: {
3131
textDecorationLine: 'none',
32-
'&:hover': {
33-
textDecorationLine: 'underline',
34-
},
3532
},
3633
});
3734

+40-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,43 @@ 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+
'&:hover': {
41+
boxShadow: '0 -3px #b8bbbe inset',
42+
},
43+
},
44+
disabled: {
45+
backgroundColor: '#6a6e73',
46+
},
47+
},
48+
},
49+
MuiCssBaseline: {
50+
styleOverrides: redhatFont,
51+
},
52+
};
1753
};

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)