Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
Material UI's Stepper Component's error state showing unwanted icon

Im using Material UI's Stepper component and trying to get the fill of a stepper that is in its error state to be red.

For reference, here is the Stepper component in Material UI's docs.

enter image description here

So im trying to show an error state. Material UI's has an error prop that will show the error state, however, I dont want the icon provided.

enter image description here

I just want it to be like any other stepper, just with a red background.

Is there any way I can get rid of that icon, and just show a red fill?

Been search all over but seems like no one really asked about this.

Here is my code:

<Stepper alternativeLabel activeStep={this.determineFormStep()} connector={<StepConnector />} className={classes.stepper}>
          {formLabels.map((label) => {
            return (
              <Step key={label}>
                <StepLabel
                  error
                  StepIconProps={{
                    classes: {
                      root: classes.step,
                      completed: classes.completed,
                      active: classes.active,
                      error: classes.error,
                      disabled: classes.disabled
                    }
                  }}>
                  <div className={classes.stepLabelRoot}>
                    <Typography className={classes.label}>
                      {label.label}
                    </Typography>
                    <span className={classes.sublabel}>
                      {label.sublabel1}
                    </span>
                    <span className={classes.sublabel}>
                      {label.sublabel2}
                    </span>
                    <span className={classes.sublabel}>
                      {label.sublabel3}
                    </span>
                  </div>
                </StepLabel>
              </Step>);
          })}
        </Stepper>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The docs for StepLabel show that it can take an optional icon prop, which is a node that overrides the step icon.

As an example, if you wanted to hide the icon entirely you could pass a Fragment element as the icon:

<StepLabel
    error
    icon={<></>}
>
    ...
</StepLabel>

Or you can change the StepIconComponent or StepIconProps.

Here is an example turns off the error state on the icon only:

<StepLabel
    error
    StepIconProps={ {error: false} }
>
    ...
</StepLabel>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda