subroh0508 / kotlin-material-ui

[UNMAINTAINED] Kotlin Wrapper Library of Material-UI
MIT License
74 stars 24 forks source link

Inconsistent behavior of `inputProps` #27

Open altavir opened 4 years ago

altavir commented 4 years ago

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

look really uncomfortable.

altavir commented 4 years ago

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.