Struggling to find a way to apply the styles for the stepper component without using inline styles. I attempted to replicate Material UI's demo, but encountered an error. The code from Material UI's demo that I want to mimic is shown below:
https://i.sstatic.net/Wldd8.png
Here is the code snippet they provided:
const ColorlibStepIconRoot = styled('div')(({ theme, ownerState }) => ({
// Styles here
}));
function ColorlibStepIcon(props) {
// Code goes here
}
I thought of avoiding the HOC component and trying something else, as seen in Material UI's demo. They import styled from:
import { styled } from '@mui/material/styles';
However, I received an error when using it. Instead, I attempted to utilize it within the styles object following the pattern with withStyles
, but encountered this error:https://i.sstatic.net/YME1K.png
My code snippet looks like this:
// My code