if you're just trying to decide between collapse__threat-scorenumber--high collapse__threat-scorenumber--medium or '' based on the condition variable, then just make a helper function that does that
then do return <div className={"collapse__threat-score"number " + getThreatScoreClassgetNumberClass(condition)}}>{number}</div>