Separate Client Portal & Dashboard
This commit is contained in:
51
frontend/client-portal/src/theme/overrides/ButtonGroup.ts
Normal file
51
frontend/client-portal/src/theme/overrides/ButtonGroup.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { Theme } from '@mui/material/styles';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export default function ButtonGroup(theme: Theme) {
|
||||
const styleContained = (
|
||||
color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'
|
||||
) => ({
|
||||
props: { variant: 'contained', color },
|
||||
style: { boxShadow: theme.customShadows[color] }
|
||||
});
|
||||
|
||||
return {
|
||||
MuiButtonGroup: {
|
||||
variants: [
|
||||
{
|
||||
props: { variant: 'contained', color: 'inherit' },
|
||||
style: { boxShadow: theme.customShadows.z8 }
|
||||
},
|
||||
styleContained('primary'),
|
||||
styleContained('secondary'),
|
||||
styleContained('info'),
|
||||
styleContained('success'),
|
||||
styleContained('warning'),
|
||||
styleContained('error'),
|
||||
|
||||
{
|
||||
props: { disabled: true },
|
||||
style: {
|
||||
boxShadow: 'none',
|
||||
'& .MuiButtonGroup-grouped.Mui-disabled': {
|
||||
color: theme.palette.action.disabled,
|
||||
borderColor: `${theme.palette.action.disabledBackground} !important`,
|
||||
'&.MuiButton-contained': {
|
||||
backgroundColor: theme.palette.action.disabledBackground
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
styleOverrides: {
|
||||
root: {
|
||||
'&:hover': {
|
||||
boxShadow: 'none'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user