I've been struggling with the proper way to override styles for a React MUI Stepper component in 2022. More specifically in the active, and completed states for the label as well as the circle icon.
My Code
import { ThemeProvider } from '@mui/styles';
import { createTheme } from '@mui/system';
const theme = createTheme({
overrides: {
MuiStepIcon: {
root: {
'&$completed': {
color: 'pink',
},
'&$active': {
color: 'red',
},
},
active: {},
completed: {},
},
MuiStepLabel: {
root: {
color: 'red'
}
}
}
})
<ThemeProvider theme={theme}>
<Stepper activeStep={activeStep} className='serviceReferralWizardStepper'>
{steps.map((label) => {
const stepProps = {};
const labelProps = {};
return (
<Step className='stepper-holder' style={{ margin: '0 1.8rem' }} key={label} {...stepProps}>
<StepLabel {...labelProps}><span className='serviceReferralWizardStepper__label'>{label}</span></StepLabel>
</Step>
);
})}
</Stepper>
Currently I see no styles at all applied. Any advice would be apprecieted.