-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Button] Remove style-propable mixin from flat-button-label #3197
Conversation
|
||
return ( | ||
<span style={this.prepareStyles(mergedRootStyles)}>{label}</span> | ||
<span style={prepareStyles(styles.root, style)}>{label}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what I understand from the transformer chain that is prepareStyles
it only takes 1 argument. so style
will probably be ignored. I think you should Object.assign({},...)
this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh geez, good catch! I actually had meant to enable a warning for that too so we could catch it similarly to callOnce
.
I think I might do that but not commit it because it's probably going to complain a lot with all the mixin implementations often using prepareStyles with multiple arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a warning is interesting 👍 It will catch all these misuses. good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱 😱 😱 😱 😱 😱
01e35f1
to
927ce03
Compare
All good 👍 😁 |
@@ -61,19 +71,16 @@ const FlatButtonLabel = React.createClass({ | |||
style, | |||
} = this.props; | |||
|
|||
const contextKeys = this.constructor.getRelevantContextKeys(this.state.muiTheme); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 We should get rid of this ContextPure
too.
[Button] Remove style-propable mixin from flat-button-label
@newoga Thanks! |
No description provided.