I just upgraded my material-ui to the v5-rc.0 and am trying to used styled-components. However, in my Component.styles.ts file I'm getting an error:
The inferred type of 'StyledStepper' cannot be named without a reference to '@mui/material/node_modules/@types/react'. This is likely not portable. A type annotation is necessary.
This is my file:
import { styled } from '@mui/material/styles';
import Stepper, { stepperClasses } from '@mui/material/Stepper';
import StepConnector, { stepConnectorClasses } from '@mui/material/StepConnector';
import { stepLabelClasses } from '@mui/material/StepLabel';
export const StyledStepper = styled(Stepper)(({ theme }) => ({
[`&.${stepperClasses.alternativeLabel}`]: {
[`.${stepLabelClasses.root}`]: {
flexDirection: 'column-reverse',
},
...
Does anyone know what this error means?