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 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions 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 @@ -38,5 +39,6 @@ export const components: Components<Theme> = {
MuiSwitch,
MuiButtonGroup,
MuiButton,
MuiListItem
MuiListItem,
MuiTabs
};
15 changes: 15 additions & 0 deletions src/theme/components/tab.modifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Components, Theme } from '@mui/material';
import { GRAY, WHITE } from '../colors';

export const MuiTab: Components<Theme>['MuiTab'] = {
styleOverrides: {
root: ({ theme }) => ({
backgroundColor: 'none',
color: theme.palette.mode === 'dark' ? WHITE : GRAY,
'&.Mui-selected': {
backgroundColor: 'none',
color: theme.palette.mode === 'dark' ? GRAY : GRAY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I've set it to none. I couldn't find a token that makes it transparent so I updated it to 'none'.

}
})
}
};
22 changes: 0 additions & 22 deletions src/theme/components/tab.modifier.ts.ts

This file was deleted.

14 changes: 14 additions & 0 deletions src/theme/components/tabs.modifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Components, Theme } from '@mui/material';
import { GRAY } from '../colors';

export const MuiTabs: Components<Theme>['MuiTabs'] = {
styleOverrides: {
root: {
width: '100%',
marginLeft: 0
},
indicator: ({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? GRAY : GRAY
})
}
};
Loading