[Switch] simplify structure WIP#26303
Conversation
|
Details of bundle changes (experimental) @material-ui/core: parsed: +0.24% , gzip: +0.28% |
oliviertassinari
left a comment
There was a problem hiding this comment.
It seems to go in the right direction. What should we do with the useFormControl?
|
@DanielBretzigheimer What do you think the next step should be? |
|
Sorry, had no time this week, but I will look into it tomorrow |
d0c728a to
3f5d400
Compare
3f5d400 to
853d63c
Compare
|
@oliviertassinari I have added the ripple effect and some other UI improvements today. I also applied your suggestions. The useFormControl is still on my agenda. I will look into it in the following days when I have time. |
|
@DanielBretzigheimer can you take a look at #26460. The PR simplify the structure of SwitchBase by replacing IconButton with ButtonBase (remove 1 level of DOM). If it is enough, we can hold this PR and improve later. |
I created this PR to address the complications from this comment. The PR isn't nearly finished, but I wanted to receive early feedback before changing too much in the code.
One thing I'm not sure about is if the SwitchBase should be removed. It clearly cleans the structure but will duplicate some code.
@oliviertassinari What do you think?
Comparison of the DOM structures:

Old
New
