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

174
Vistas
How to make one word to show as Bold in a Ternary Operator?

How can I make the word Full display as Bold in the ternary operator below? If I change it in the span it will make the word enrolled and spots show as bold as well and I don't want that. What's the way to do it?

<span
  style={{
    flexGrow: 1,
    color: "lightgrey",
    fontSize: "12px",
    marginLeft: "10px"
  }}
>
  {e.enrolledNum / e.total_spots >= 1
    ? 'Full'
    : `${e.enrolledNum} enrolled ${""} / ${""} ${
        e.total_spots ? e.total_spots : "0"
      } spots`}
</span>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Wrap it in a strong tag, or if that's not what you mean semantically, some other inline element with a class that makes it bold.

For instance:

<span
  style={{
    flexGrow: 1,
    color: "lightgrey",
    fontSize: "12px",
    marginLeft: "10px"
  }}
>
  {e.enrolledNum / e.total_spots >= 1
    ? <strong>Full</strong>
    : `${e.enrolledNum} enrolled ${""} / ${""} ${
        e.total_spots ? e.total_spots : "0"
      } spots`}
</span>
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