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

[FlatButton] icon props are not passed through #4144

Closed
echenley opened this issue May 3, 2016 · 4 comments · Fixed by #4160
Closed

[FlatButton] icon props are not passed through #4144

echenley opened this issue May 3, 2016 · 4 comments · Fixed by #4160
Labels
bug 🐛 Something doesn't work

Comments

@echenley
Copy link
Contributor

echenley commented May 3, 2016

Problem Description

Icon props aren't passed through when using FlatButton's icon prop. See android button in the docs: http://www.material-ui.com/v0.15.0-beta.2/#/components/flat-button. It is passed a color but remains black.

<FlatButton
  backgroundColor="#a4c639"
  hoverColor="#8AA62F"
  icon={<ActionAndroid color={fullWhite} />}
  style={style}
/>

Output:

screen shot 2016-05-02 at 8 58 55 pm

Versions

  • Material-UI: 0.15.0-beta.2
  • React: 15
@jschlieber
Copy link

I've got the exact same problem with the leftIcon and rightIcon props of ListItem. Those will always display grey, despite setting color:

import {List, ListItem} from 'material-ui/List';
import CheckIcon from 'material-ui/svg-icons/navigation/check';
import {green500} from 'material-ui/styles/colors';

// ... some code ...

<ListItem
  primaryText="License active"
  secondaryText={`until ${paymentExpiryFormatted}`}
  leftIcon={<CheckIcon color={green500}/>}
/>

Same Versions

@tintin1343
Copy link
Contributor

tintin1343 commented May 4, 2016

Edit: This is weird, initially it did not but then this worked fine for me. I later realized that it was because of my changes that it worked fine. Still investigating.

<FlatButton
      backgroundColor="#a4c639"
      hoverColor="#8AA62F"
      icon={<ActionAndroid color={fullWhite}/>}
      style={style}
    />

screen shot 2016-05-04 at 2 22 38 pm

@tintin1343 tintin1343 added bug 🐛 Something doesn't work and removed bug 🐛 Something doesn't work labels May 4, 2016
tintin1343 added a commit to tintin1343/material-ui that referenced this issue May 4, 2016
@tintin1343 tintin1343 added the bug 🐛 Something doesn't work label May 4, 2016
@tintin1343
Copy link
Contributor

Confirmed Bug. This should be fixed when the PR is merged.

tintin1343 added a commit to tintin1343/material-ui that referenced this issue May 4, 2016
tintin1343 added a commit to tintin1343/material-ui that referenced this issue May 5, 2016
@giolin
Copy link

giolin commented May 6, 2016

Happened to bump into the same problem. Thanks for that! It really helped.
I am expecting new release.

tintin1343 added a commit to tintin1343/material-ui that referenced this issue May 6, 2016
und3fined pushed a commit to und3fined/material-ui that referenced this issue May 17, 2016
alitaheri pushed a commit to alitaheri/material-ui that referenced this issue Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants