Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(tabs): add styling to tabs #833

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
28 changes: 27 additions & 1 deletion src/base/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
import { Tabs as MuiTabs, type TabsProps as MuiTabsProps } from '@mui/material';

export function Tabs(props: MuiTabsProps): JSX.Element {
return <MuiTabs {...props} />;
return (
<MuiTabs
{...props}
sudhanshutech marked this conversation as resolved.
Show resolved Hide resolved
sx={(theme) => ({
width: '100%',
marginLeft: 0,
'& .MuiTabs-indicator': {
backgroundColor:
theme.palette.mode === 'dark'
? theme.palette.background?.default
: theme.palette.background?.brand?.hover
},
'& .MuiTab-root': {
backgroundColor: 'transparent',
color:
theme.palette.mode === 'dark' ? theme.palette.text.default : theme.palette.text.default,
'&.Mui-selected': {
backgroundColor: 'transparent',
color:
theme.palette.mode === 'dark'
? theme.palette.background?.brand
: theme.palette.background?.brand?.default
}
}
})}
/>
);
}

export default Tabs;