Skip to content

Commit

Permalink
Merge pull request #864 from sudhanshutech/tabs/theme
Browse files Browse the repository at this point in the history
[theme]: tabs custom theme
  • Loading branch information
sudhanshutech authored Dec 28, 2024
2 parents 3cf7ecb + da52d02 commit 0539743
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/theme/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { MuiOutlinedInput } from './components/outlinedinput.modifier';
import { MuiPagination } from './components/pagination.modifier';
import { MuiSvgIcon } from './components/svgicon.modifier';
import { MuiSwitch } from './components/switch.modifier';
import { MuiTab } from './components/tab.modifier.ts';
import { MuiTab } from './components/tab.modifier';
import { MuiTabs } from './components/tabs.modifier';

export const components: Components<Theme> = {
MuiAppBar,
Expand All @@ -35,6 +36,7 @@ export const components: Components<Theme> = {
MuiPagination,
MuiSvgIcon,
MuiTab,
MuiTabs,
MuiSwitch,
MuiButtonGroup,
MuiButton,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const MuiTab: Components<Theme>['MuiTab'] = {
color: defaultText,
backgroundColor: defaultBackground
},
backgroundColor: defaultText,
color: defaultBackground
backgroundColor: 'none',
color: defaultText
};
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/theme/components/tabs.modifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Components, Theme } from '@mui/material';

export const MuiTabs: Components<Theme>['MuiTabs'] = {
styleOverrides: {
root: ({ theme }) => ({
backgroundColor: theme.palette.background.default
}),
indicator: ({ theme }) => ({
backgroundColor: theme.palette.background.brand?.default
})
}
};

0 comments on commit 0539743

Please sign in to comment.