I need to render a number with bigger font in a span
tag in Spanish.
I have a React.js code like this with ternary operator:
<div>
{togo !== 0
? (<div className="text-center"><span className="display-4">{togo}</span>{togo > 1 ? ` questions remaining` : ` left!`}</div>)
: ("")
}
</div>
In words: if there is togo
, render div with span
, if togo
> 1, render questions remaining
, if not render left
.
English:
10
questions remaining
Spanish:
Quedan
10
preguntas
The problem is: the number in Spanish, is in the middle of the sentence. How can I render the span
tag so the number is displayed bigger than the text?