Closed glennsl closed 2 years ago
Yeah I like that this is the minimal expression.
I could imagine something more sophisticated to support optional class names for example
Do you think this should be part of jsoo-react? Or rather a 3rd party lib like rescript-classnames ?
Do you think this should be part of jsoo-react? Or rather a 3rd party lib like rescript-classnames ?
I'm thinking it might as well be, since I imagine pretty much everyone would want this. Depends a bit on how opinionated the solution is though. Could also do a halfway solutions by putting it in a separate namespace, temporarily or permanently. but either way there's no rush I think.
I've found it very useful to be able to pass a list of class names, rather than having to build a class string manually. This is the simplest version of that, but I could imagine something more sophisticated to support optional class names for example.
Currently, to pass an optional class name you'd have to do something like:
but could perhaps instead be:
But this could be added in a way that maintains backwards-compatibility, so not all that important to do now I think.