import * as React from 'react';
import Badge from '@mui/material/Badge';
import { createTheme } from '@mui/material/styles';
// Update the Button's extendable props options
declare module '@mui/material/Badge' {
interface BadgePropsVariantOverrides {
action: true;
}
interface BadgePropsColorOverrides {
success: true;
}
}
// theme typings should work as expected
const theme = createTheme({
components: {
MuiBadge: {
variants: [
{
props: { variant: 'action' },
style: {
border: `2px dashed grey`,
},
},
{
props: { color: 'success' },
style: {
backgroundColor: 'green',
},
},
],
},
},
});
;
// @ts-expect-error typo
;
// @ts-expect-error typo
;