-
-
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
[RaisedButton] backgroundColor prop was previously ignored #3515
Conversation
Looks like it the same for the |
@@ -45,6 +45,9 @@ function getStyles(props, state) { | |||
} else if (secondary) { | |||
backgroundColor = raisedButton.secondaryColor; | |||
labelColor = raisedButton.secondaryTextColor; | |||
} else if (props.backgroundColor) { |
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.
What about using this logic?
} else {
if (props.backgroundColor) {
backgroundColor = props.backgroundColor || raisedButton.secondaryColor;
}
if (props.labelColor) {
labelColor = props.labelColor || raisedButton.secondaryTextColor;
}
}
Well, you're already setting your defaults here:
So in the proposed
|
Actually, to change option 1 above.. I wouldn't get rid of the lines, just change them to:
I'm a proponent of declaring variables at the top of scopes so they're easy to find. |
Hmm, this might be a mistake actually? There are no such properties on |
I went with option 2 above, because it introduces the least amount of changes. If we had gone with option 1, buttons without |
That looks good to me 👍. |
This is great, thanks 👍 👍 |
[RaisedButton] backgroundColor prop was previously ignored
[RaisedButton] backgroundColor prop was previously ignored
Strange. This is documented, though it was apparently ignored in the code.