From da52d02804994969e8ee7d397cadef6c983ef6ca Mon Sep 17 00:00:00 2001 From: Sudhanshu Dasgupta Date: Sat, 28 Dec 2024 08:37:53 +0530 Subject: [PATCH] fix(theme): tabs theme Signed-off-by: Sudhanshu Dasgupta --- src/theme/components.ts | 4 +++- .../{tab.modifier.ts.ts => tab.modifier.ts} | 4 ++-- src/theme/components/tabs.modifier.ts | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) rename src/theme/components/{tab.modifier.ts.ts => tab.modifier.ts} (86%) create mode 100644 src/theme/components/tabs.modifier.ts diff --git a/src/theme/components.ts b/src/theme/components.ts index b04270d12..6f9e3eaaf 100644 --- a/src/theme/components.ts +++ b/src/theme/components.ts @@ -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 = { MuiAppBar, @@ -35,6 +36,7 @@ export const components: Components = { MuiPagination, MuiSvgIcon, MuiTab, + MuiTabs, MuiSwitch, MuiButtonGroup, MuiButton, diff --git a/src/theme/components/tab.modifier.ts.ts b/src/theme/components/tab.modifier.ts similarity index 86% rename from src/theme/components/tab.modifier.ts.ts rename to src/theme/components/tab.modifier.ts index 835ce0ea1..ed7ca5875 100644 --- a/src/theme/components/tab.modifier.ts.ts +++ b/src/theme/components/tab.modifier.ts @@ -14,8 +14,8 @@ export const MuiTab: Components['MuiTab'] = { color: defaultText, backgroundColor: defaultBackground }, - backgroundColor: defaultText, - color: defaultBackground + backgroundColor: 'none', + color: defaultText }; } } diff --git a/src/theme/components/tabs.modifier.ts b/src/theme/components/tabs.modifier.ts new file mode 100644 index 000000000..63173a06c --- /dev/null +++ b/src/theme/components/tabs.modifier.ts @@ -0,0 +1,12 @@ +import { Components, Theme } from '@mui/material'; + +export const MuiTabs: Components['MuiTabs'] = { + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.background.default + }), + indicator: ({ theme }) => ({ + backgroundColor: theme.palette.background.brand?.default + }) + } +};