Skip to content

FontIcon inside FlatButton does not obey the color property #4516

@FaideWW

Description

@FaideWW

Problem description

Adding a FontIcon to a FlatButton as its icon property will ignore that icon's color property.

This can be seen in the documentation for FlatButton as well. The android icon inside the green button should be white, but instead it's black.

Steps to reproduce

This is the snippet I'm observing the problem in:

const fillIcon = <FontIcon className="material-icons" color="#f00">palette</FontIcon>
return (
  <div>
    {fillIcon}
    <FlatButton icon={fillIcon} label="Fill" />
  </div>
);

Screenshot of the above:
screen shot 2016-06-17 at 12 12 10 pm

Versions

  • Material-UI: 0.15.0
  • React: 15.1.0
  • Browser: Chrome 51.0, Firefox 47.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions