Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
62 lines
1.7 KiB
JavaScript
62 lines
1.7 KiB
JavaScript
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
import Button from '@mui/material/Button';
|
|
|
|
const customTheme = createTheme({
|
|
components: {
|
|
MuiButton: {
|
|
styleOverrides: {
|
|
root: {
|
|
variants: [
|
|
{
|
|
props: { variant: 'dashed' },
|
|
style: ({ theme }) => ({
|
|
textTransform: 'none',
|
|
border: `2px dashed ${theme.palette.primary.main}`,
|
|
color: theme.palette.primary.main,
|
|
}),
|
|
},
|
|
{
|
|
props: { variant: 'dashed', color: 'secondary' },
|
|
style: ({ theme }) => ({
|
|
border: `2px dashed ${theme.palette.secondary.main}`,
|
|
color: theme.palette.secondary.main,
|
|
}),
|
|
},
|
|
{
|
|
props: { variant: 'dashed', size: 'large' },
|
|
style: {
|
|
borderWidth: 4,
|
|
},
|
|
},
|
|
{
|
|
props: { variant: 'dashed', color: 'secondary', size: 'large' },
|
|
style: {
|
|
fontSize: 18,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default function GlobalThemeVariants() {
|
|
return (
|
|
<ThemeProvider theme={customTheme}>
|
|
<Button variant="dashed" sx={{ m: 1 }}>
|
|
Dashed
|
|
</Button>
|
|
<Button variant="dashed" color="secondary" sx={{ m: 1 }}>
|
|
Secondary
|
|
</Button>
|
|
<Button variant="dashed" size="large" sx={{ m: 1 }}>
|
|
Large
|
|
</Button>
|
|
<Button variant="dashed" color="secondary" size="large" sx={{ m: 1 }}>
|
|
Secondary large
|
|
</Button>
|
|
</ThemeProvider>
|
|
);
|
|
}
|