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
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
import Chip from '@mui/material/Chip';
|
|
import Check from '@mui/icons-material/Check';
|
|
|
|
const finalTheme = createTheme({
|
|
components: {
|
|
MuiChip: {
|
|
styleOverrides: {
|
|
root: ({ theme }) =>
|
|
theme.unstable_sx({
|
|
// https://mui.com/system/getting-started/the-sx-prop/#spacing
|
|
px: 1,
|
|
py: 0.25,
|
|
// https://mui.com/system/borders/#border-radius
|
|
borderRadius: 1, // 4px as default.
|
|
}),
|
|
label: {
|
|
padding: 'initial',
|
|
},
|
|
icon: ({ theme }) =>
|
|
theme.unstable_sx({
|
|
mr: 0.5,
|
|
ml: '-2px',
|
|
}),
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default function GlobalThemeOverrideSx() {
|
|
return (
|
|
<ThemeProvider theme={finalTheme}>
|
|
<Chip
|
|
color="success"
|
|
label={
|
|
<span>
|
|
<b>Status:</b> Completed
|
|
</span>
|
|
}
|
|
icon={<Check fontSize="small" />}
|
|
/>
|
|
</ThemeProvider>
|
|
);
|
|
}
|