You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example above, the button will be outlined. It should be contained.
Moreover we don't have the same behavior if we use props destructuring with default values instead of defaultProps. In this case, the button would be contained.
Theme props work as expected for Material-UI components because they use props destructuring.
Expected Behavior 🤔
Theme default props should override Component default props.
The text was updated successfully, but these errors were encountered:
adridavid
changed the title
[styles] Theme default props are overrides by Component default props
[styles] Theme default props are overriden by Component default props
Mar 12, 2020
Current Behavior 😯
Using withStyles, theme default props are overriden by Component default props.
In the example above, the button will be outlined. It should be contained.
Moreover we don't have the same behavior if we use props destructuring with default values instead of defaultProps. In this case, the button would be contained.
Theme props work as expected for Material-UI components because they use props destructuring.
Expected Behavior 🤔
Theme default props should override Component default props.
Steps to Reproduce 🕹
A code sandbox example is available here.
The text was updated successfully, but these errors were encountered: