From 91e90bb52c1ea0a70268b7319dbb4ffe6680aac6 Mon Sep 17 00:00:00 2001 From: 59naga Date: Sat, 12 Mar 2016 02:38:54 +0900 Subject: [PATCH] [AppBar] Add iconStyleLeft prop (fix #3667) --- src/app-bar.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app-bar.jsx b/src/app-bar.jsx index 85b476d0972c57..14f444afbbccfb 100644 --- a/src/app-bar.jsx +++ b/src/app-bar.jsx @@ -98,6 +98,11 @@ const AppBar = React.createClass({ */ iconElementRight: React.PropTypes.element, + /** + * Override the inline-styles of the element displayed on the left side of the app bar. + */ + iconStyleLeft: React.PropTypes.object, + /** * Override the inline-styles of the element displayed on the right side of the app bar. */ @@ -216,6 +221,7 @@ const AppBar = React.createClass({ const { title, titleStyle, + iconStyleLeft, iconStyleRight, showMenuIconButton, iconElementLeft, @@ -247,6 +253,8 @@ const AppBar = React.createClass({ style: prepareStyles(Object.assign(styles.title, styles.mainElement, titleStyle)), }, title); + const iconLeftStyle = Object.assign({}, styles.iconButtonStyle, iconStyleLeft); + if (showMenuIconButton) { let iconElementLeftNode = iconElementLeft; @@ -260,7 +268,7 @@ const AppBar = React.createClass({ } menuElementLeft = ( -
+
{iconElementLeftNode}
); @@ -268,7 +276,7 @@ const AppBar = React.createClass({ const child = iconClassNameLeft ? '' : ; menuElementLeft = (