Declared variants for the vertical version of tabs in the theme.
This commit is contained in:
1 parent
e76c3853f3
commit
5e730acd47
2 files changed
+74
-66
No files matched your search
@@ -182,39 +182,11 @@ const NotificationIntegrationModal = ({
|
|||||||
value={tabValue}
|
value={tabValue}
|
||||||
onChange={handleChangeTab}
|
onChange={handleChangeTab}
|
||||||
aria-label="Notification tabs"
|
aria-label="Notification tabs"
|
||||||
sx={{
|
|
||||||
backgroundColor: theme.palette.primary.main,
|
|
||||||
'& .MuiTab-root': {
|
|
||||||
alignItems: 'flex-start',
|
|
||||||
px: 2,
|
|
||||||
fontSize: '0.9rem',
|
|
||||||
color: theme.palette.primary.contrastText,
|
|
||||||
backgroundColor: theme.palette.primary.main,
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: 'none',
|
|
||||||
borderRight: 'none',
|
|
||||||
'&.Mui-selected': {
|
|
||||||
color: theme.palette.primary.contrastText,
|
|
||||||
backgroundColor: theme.palette.tertiary.main, // Match the hover background color
|
|
||||||
opacity: 1,
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: 'none',
|
|
||||||
borderRight: 'none'
|
|
||||||
},
|
|
||||||
'&:hover': {
|
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
|
||||||
border: 'none'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'& .MuiTabs-indicator': {
|
|
||||||
backgroundColor: 'transparent'
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Tab label="Slack" />
|
<Tab label="Slack" orientation="vertical" />
|
||||||
<Tab label="Discord" />
|
<Tab label="Discord" orientation="vertical" />
|
||||||
<Tab label="Telegram" />
|
<Tab label="Telegram" orientation="vertical" />
|
||||||
<Tab label="Webhooks" />
|
<Tab label="Webhooks" orientation="vertical" />
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
@@ -328,35 +328,61 @@ const baseTheme = (palette) => ({
|
|||||||
},
|
},
|
||||||
MuiTab: {
|
MuiTab: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: theme.palette.tertiary.contrastText,
|
color: theme.palette.tertiary.contrastText,
|
||||||
backgroundColor: theme.palette.tertiary.main,
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
textTransform: "none",
|
textTransform: "none",
|
||||||
minWidth: "fit-content",
|
minWidth: "fit-content",
|
||||||
paddingY: theme.spacing(6),
|
paddingY: theme.spacing(6),
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
borderBottom: "2px solid transparent",
|
borderBottom: "2px solid transparent",
|
||||||
borderRight: `1px solid ${theme.palette.primary.lowContrast}`,
|
borderRight: `1px solid ${theme.palette.primary.lowContrast}`,
|
||||||
"&:first-of-type": { borderTopLeftRadius: "8px" },
|
"&:first-of-type": { borderTopLeftRadius: "8px" },
|
||||||
"&:last-child": { borderTopRightRadius: "8px", borderRight: 0 },
|
"&:last-child": { borderTopRightRadius: "8px", borderRight: 0 },
|
||||||
"&:focus-visible": {
|
"&:focus-visible": {
|
||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
borderColor: theme.palette.tertiary.contrastText,
|
borderColor: theme.palette.tertiary.contrastText,
|
||||||
borderRightColor: theme.palette.primary.lowContrast,
|
borderRightColor: theme.palette.primary.lowContrast,
|
||||||
},
|
},
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
backgroundColor: theme.palette.secondary.main,
|
backgroundColor: theme.palette.secondary.main,
|
||||||
color: theme.palette.secondary.contrastText,
|
color: theme.palette.secondary.contrastText,
|
||||||
borderColor: theme.palette.secondary.contrastText,
|
borderColor: theme.palette.secondary.contrastText,
|
||||||
borderRightColor: theme.palette.primary.lowContrast,
|
borderRightColor: theme.palette.primary.lowContrast,
|
||||||
},
|
},
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.primary.lowContrast,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
variants: [
|
||||||
|
{
|
||||||
|
props: { orientation: 'vertical' },
|
||||||
|
style: ({ theme }) => ({
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
padding: theme.spacing(2),
|
||||||
|
color: theme.palette.primary.contrastText,
|
||||||
|
backgroundColor: theme.palette.primary.main,
|
||||||
|
border: 'none',
|
||||||
|
borderBottom: 'none',
|
||||||
|
borderRight: 'none',
|
||||||
|
'&.Mui-selected': {
|
||||||
|
color: theme.palette.primary.contrastText,
|
||||||
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
|
opacity: 1,
|
||||||
|
border: 'none',
|
||||||
|
borderBottom: 'none',
|
||||||
|
borderRight: 'none'
|
||||||
|
},
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.tertiary.main,
|
||||||
|
border: 'none'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
MuiSvgIcon: {
|
MuiSvgIcon: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
@@ -366,13 +392,23 @@ const baseTheme = (palette) => ({
|
|||||||
},
|
},
|
||||||
MuiTabs: {
|
MuiTabs: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
"& .MuiTabs-indicator": {
|
"& .MuiTabs-indicator": {
|
||||||
backgroundColor: theme.palette.tertiary.contrastText,
|
backgroundColor: theme.palette.tertiary.contrastText,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
variants: [
|
||||||
|
{
|
||||||
|
props: { orientation: 'vertical' },
|
||||||
|
style: {
|
||||||
|
"& .MuiTabs-indicator": {
|
||||||
|
display: 'none',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
MuiSwitch: {
|
MuiSwitch: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
|
|||||||
Reference in new issue
Block a user