Skip to content

Commit da52d02

Browse files
committed
fix(theme): tabs theme
Signed-off-by: Sudhanshu Dasgupta <[email protected]>
1 parent 9bbe475 commit da52d02

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/theme/components.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import { MuiOutlinedInput } from './components/outlinedinput.modifier';
1717
import { MuiPagination } from './components/pagination.modifier';
1818
import { MuiSvgIcon } from './components/svgicon.modifier';
1919
import { MuiSwitch } from './components/switch.modifier';
20-
import { MuiTab } from './components/tab.modifier.ts';
20+
import { MuiTab } from './components/tab.modifier';
21+
import { MuiTabs } from './components/tabs.modifier';
2122

2223
export const components: Components<Theme> = {
2324
MuiAppBar,
@@ -35,6 +36,7 @@ export const components: Components<Theme> = {
3536
MuiPagination,
3637
MuiSvgIcon,
3738
MuiTab,
39+
MuiTabs,
3840
MuiSwitch,
3941
MuiButtonGroup,
4042
MuiButton,

src/theme/components/tab.modifier.ts.ts renamed to src/theme/components/tab.modifier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export const MuiTab: Components<Theme>['MuiTab'] = {
1414
color: defaultText,
1515
backgroundColor: defaultBackground
1616
},
17-
backgroundColor: defaultText,
18-
color: defaultBackground
17+
backgroundColor: 'none',
18+
color: defaultText
1919
};
2020
}
2121
}

src/theme/components/tabs.modifier.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Components, Theme } from '@mui/material';
2+
3+
export const MuiTabs: Components<Theme>['MuiTabs'] = {
4+
styleOverrides: {
5+
root: ({ theme }) => ({
6+
backgroundColor: theme.palette.background.default
7+
}),
8+
indicator: ({ theme }) => ({
9+
backgroundColor: theme.palette.background.brand?.default
10+
})
11+
}
12+
};

0 commit comments

Comments
 (0)