Switch element exposes input properties as INPUT.() -> Unit, while TextField exposes them as InputElementBuilder<InputProps>.() -> Unit. The resulting code looks different for different elements which does not look good. It seems like Switch way is preferable.
Actually, these two lines:
var Tag.InputProps: RProps? by materialProps
var Tag.inputProps: RProps? by materialProps
It seems like this one is a problem of Material-UI, not the wrapper. Still, for those not familiar with it, it is really confusing. I think that the difference should be documented.
Switch element exposes input properties as
INPUT.() -> Unit
, while TextField exposes them asInputElementBuilder<InputProps>.() -> Unit
. The resulting code looks different for different elements which does not look good. It seems like Switch way is preferable.Actually, these two lines:
look really uncomfortable.