From c61b69502db1155a98609595295fea43870e05cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jir=CC=8Ci=CC=81=20Ota=CC=81hal?= Date: Sun, 5 Feb 2017 18:42:08 +0100 Subject: [PATCH] Fix color of selected bottom navigation action [BottomNavigationAction] --- src/BottomNavigation/BottomNavigationAction.react.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BottomNavigation/BottomNavigationAction.react.js b/src/BottomNavigation/BottomNavigationAction.react.js index bfbb8dc0..d5c109a9 100644 --- a/src/BottomNavigation/BottomNavigationAction.react.js +++ b/src/BottomNavigation/BottomNavigationAction.react.js @@ -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 = ; }