After updating my material-ui to version v5-rc.0, I decided to implement styled-components
. However, as I was working on my Component.styles.ts
file, I encountered 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 and a type annotation is necessary.
Below is the content of 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',
},
...
Can someone please help me understand what this error signifies?