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
31 lines
627 B
TypeScript
31 lines
627 B
TypeScript
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
import Checkbox from '@mui/material/Checkbox';
|
|
import { green, orange } from '@mui/material/colors';
|
|
|
|
const outerTheme = createTheme({
|
|
palette: {
|
|
primary: {
|
|
main: orange[500],
|
|
},
|
|
},
|
|
});
|
|
|
|
const innerTheme = createTheme({
|
|
palette: {
|
|
primary: {
|
|
main: green[500],
|
|
},
|
|
},
|
|
});
|
|
|
|
export default function ThemeNesting() {
|
|
return (
|
|
<ThemeProvider theme={outerTheme}>
|
|
<Checkbox defaultChecked />
|
|
<ThemeProvider theme={innerTheme}>
|
|
<Checkbox defaultChecked />
|
|
</ThemeProvider>
|
|
</ThemeProvider>
|
|
);
|
|
}
|