Ignore rules with null, undefined or false values
vdanchenkov opened this issue · 3 comments
vdanchenkov commented
It will make it easier to write conditional styles this way:
const needPadding = true
<div {...style({ color: 'black', padding: needPadding && 10 })}/>
@threepointone I can send PR if you find this change useful.
threepointone commented
Love it, and a PR would be great! If my code's not easy to change, lemme know and I can pitch in too. Thank you!
threepointone commented
this is now live in 2.15.0, thanks much @vdanchenkov!
vdanchenkov commented
Ohh, it turned out to be a little more complicated. No sure why tests have not catched it, by current implementation is broken. Fix is on the way.