Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
Is there a possibility to add nth-child for a javascript variable? I need to add it to typescript code

enter image description here

This is inside a .tsx file. The styles variable is applied as styles={styles}

var styles = {
  bmBurgerBars: {
    height: '10px',
    right: '20px'
  }
  //nth child for bmBars
}

I have tried the below code but it is not implementing on the UI

var styles = {
  bmBurgerBars: {
    height: '10px',
    right: '20px',
    '&:nth-child(2)': {
      width: '80%',
      left: '7px',
      background: '#111'
    }
  }
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Assuming you're using a library such as Material UI (or similar/forked), you can use the following spec:

var styles = {
  bmBars: {
    height: '10px',
    right: '20px',
    '&:nth-child(n)': {
      color: 'red'
    }
  }
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda