How do you change the Stepper color on React Material UI?

前端 未结 7 1246
不知归路
不知归路 2021-02-14 01:17

In the screenshot above, I am trying to change the step color to either: green for correct, yellow for in-progress and red for incorrect.

How could I do this?

相关标签:
7条回答
  • 2021-02-14 01:47

    We need to pass the class to StepperLabel props . For example if we need to change alternativeLabel class then try the below:-

    
      <StepLabel
      StepIconComponent={stepperIcon} 
      classes={{
             alternativeLabel: classes.alternativeLabel,
              }}
       >
        <span className={cn(classes.label, labelClass)}>
           {'label'}
        </span>
      </StepLabel>
    
    
    0 讨论(0)
提交回复
热议问题