Closed tomdye closed 5 years ago
Now that widget properties are extendable, this should be simple 👍
just my two cents :
The css file for these would be made much simpler and it will be clearer to users how to use and style them.
This is more a general issue with themed classes which can be null
–
in my personal widgets I give it a "counter-class" even if it is an empty css definition, here :
mode === Mode.toggle ? css.toggleWrapper : css.inputWrapper
Also I use composes:
fairly often and we can't compose .inputWrapper:not(.toggle .inputWrapper)
but we can compose the "counter-class": .toggleWrapper
This work has been documented in the material checkbox issue by @pottedmeat
Enhancement
The checkbox and toggle widgets should likely be split into their own widgets. The css file for these would be made much simpler and it will be clearer to users how to use and style them.