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

205
Visualizações
MUI Discrete Slider dynamic styles
const CustomizedSlider = withStyles((theme) => ({
  track: {
    //styles the line between thumbs
    height: 4,
    backgroundColor: theme.palette.warning.main, // we can manipulate color here
  },
  rail: {
    //styles line outside of thumbs
    opacity: 1,
    height: 4,
    borderRadius: 0,
  },
  thumb: {
    height: 14,
    width: 14,
    background: 'white',
    border: '1px solid black',
  },
  mark: {
    height: 8,
    borderRadius: 0,
  },
  markActive: {
    opacity: 1,
    backgroundColor: 'currentColor',
  },
}))(Slider);

<CustomizedSlider
              className={className}
              value={data.severity || 0}
              valueLabelDisplay="off"
              step={1}
              min={0}
              max={4}
              marks={steps}
              onChange={this.handleSeverityChange}
            />

This component is a part of UI. It rendered in class component in the same way: I need to have a colored track that is based on steps (input[data-index]). For example: if the step.value === 0 the backgroundColor of the active track is red, step.value === 1 - blue and so on

about 4 years ago · Juan Pablo Isaza
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