material-web icon indicating copy to clipboard operation
material-web copied to clipboard

Button classes method should align with that of switch

Open yinonov opened this issue 4 years ago • 1 comments

Describe the bug Button getRenderClasses returns a classMap

https://github.com/material-components/material-web/blob/fab48beeb9356f47eee4c481419c7ea6ef97e692/packages/button/mwc-button-base.ts#L92-L99

Switch, on the other hand, returns a simple object and is easy to extend if subclassed

https://github.com/material-components/material-web/blob/fab48beeb9356f47eee4c481419c7ea6ef97e692/packages/switch/mwc-switch-base.ts#L111-L117

Expected behavior Align to a convention, preferably that of switch so it will be easier to control and manipulate if need be

yinonov avatar Aug 28 '21 21:08 yinonov

if this should be a convention, would it make sense to align other components to it? can I PR? it helps with the subclassing. instead of overriding templates, we can just extend the getRenderClasses member

yinonov avatar Sep 03 '21 05:09 yinonov

Obsolete with M3

asyncliz avatar Aug 02 '23 02:08 asyncliz