Skip to content

Commit

Permalink
feat(Tabs): add support for CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed May 2, 2022
1 parent c919863 commit a56b83d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/mui-material/src/Tab/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,25 @@ const TabRoot = styled(ButtonBase, {
opacity: 1,
},
[`&.${tabClasses.disabled}`]: {
opacity: theme.palette.action.disabledOpacity,
opacity: (theme.vars || theme).palette.action.disabledOpacity,
},
}),
...(ownerState.textColor === 'primary' && {
color: theme.palette.text.secondary,
color: (theme.vars || theme).palette.text.secondary,
[`&.${tabClasses.selected}`]: {
color: theme.palette.primary.main,
color: (theme.vars || theme).palette.primary.main,
},
[`&.${tabClasses.disabled}`]: {
color: theme.palette.text.disabled,
color: (theme.vars || theme).palette.text.disabled,
},
}),
...(ownerState.textColor === 'secondary' && {
color: theme.palette.text.secondary,
color: (theme.vars || theme).palette.text.secondary,
[`&.${tabClasses.selected}`]: {
color: theme.palette.secondary.main,
color: (theme.vars || theme).palette.secondary.main,
},
[`&.${tabClasses.disabled}`]: {
color: theme.palette.text.disabled,
color: (theme.vars || theme).palette.text.disabled,
},
}),
...(ownerState.fullWidth && {
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ const TabsIndicator = styled('span', {
width: '100%',
transition: theme.transitions.create(),
...(ownerState.indicatorColor === 'primary' && {
backgroundColor: theme.palette.primary.main,
backgroundColor: (theme.vars || theme).palette.primary.main,
}),
...(ownerState.indicatorColor === 'secondary' && {
backgroundColor: theme.palette.secondary.main,
backgroundColor: (theme.vars || theme).palette.secondary.main,
}),
...(ownerState.vertical && {
height: '100%',
Expand Down

0 comments on commit a56b83d

Please sign in to comment.