Skip to content
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] Fix backgroundColor property #3579

Closed
wants to merge 1 commit into from
Closed

Conversation

lubosz
Copy link

@lubosz lubosz commented Mar 3, 2016

The backgroundColor property currently does not have any effect on RaisedButton.

As documented RaisedButton should provide a backgroundColor property:
http://www.material-ui.com/v0.15.0-alpha.1/#/components/floating-action-button

Updating from 0.11.0 to 0.15.0-alpha.1 broke this behavior for me.
8587247 seems to be the commit introducing the not working code.

The following patch makes RaidedButton use the property again, like seen in FloatingActionButton:
https://github.com/callemall/material-ui/blob/master/src/floating-action-button.jsx#L17

@@ -35,7 +35,7 @@ function getStyles(props, state) {

const amount = (primary || secondary) ? 0.4 : 0.08;

let backgroundColor = raisedButton.color;
let backgroundColor = props.backgroundColor || raisedButton.color;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you deconstruct it at the top of the render() function. Should be good after that 👍

@nathanmarks nathanmarks added the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Mar 3, 2016
@mbrookes mbrookes changed the title raised-button: Actually use backgroundColor property. [RaisedButton] Fix backgroundColor property Mar 5, 2016
@mbrookes mbrookes added the bug 🐛 Something doesn't work label Mar 5, 2016
@mbrookes
Copy link
Member

mbrookes commented Mar 9, 2016

Ping @lubosz

@nathanmarks
Copy link
Member

Fixed in #3515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants