Skip to content

Commit

Permalink
Fix color of selected bottom navigation action [BottomNavigationAction]
Browse files Browse the repository at this point in the history
  • Loading branch information
xotahal committed Feb 5, 2017
1 parent 11acecf commit c61b695
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BottomNavigation/BottomNavigationAction.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class BottomNavigationAction extends PureComponent {
renderIcon(icon, styles, color) {
let element;
if (React.isValidElement(icon)) {
element = icon;
// we need icon to change color after it's selected, so we send the color and style to
// custom element
element = React.cloneElement(icon, { style: styles.icon, color });
} else {
element = <Icon name={icon} style={styles.icon} color={color} />;
}
Expand Down

0 comments on commit c61b695

Please sign in to comment.