I'm about to make the next my page with React and I can't find how to put a configurable attribute set into component, for example:
<ProgressBar active now={current} max={total}/>
I want to add the active attribute inside the ProgressBar only if current == total
.
How can I do this?
Is there an easy way to switch between two options active and stripped? Something like this:
<ProgressBar {current==total ? stripped : active} now={current} max={total}/>
except to create a properties object and spread it {...props}