Skip to content

Commit

Permalink
[ToolbarGroup] Correctly transfer inline styles of direct children
Browse files Browse the repository at this point in the history
  • Loading branch information
alshain committed Jun 26, 2015
1 parent df8427b commit e579df5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/toolbar/toolbar-group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,24 @@ let ToolbarGroup = React.createClass({
switch (currentChild.type.displayName) {
case 'DropDownMenu' :
return React.cloneElement(currentChild, {
style: styles.dropDownMenu.root,
style: this.mergeStyles(styles.dropDownMenu.root, currentChild.props.style),
styleControlBg: styles.dropDownMenu.controlBg,
styleUnderline: styles.dropDownMenu.underline
});
case 'DropDownIcon' :
return React.cloneElement(currentChild, {
style: {float: 'left'},
style: this.mergeStyles({float: 'left'}, currentChild.props.style),
iconStyle: styles.icon.root,
onMouseOver: this._handleMouseOverDropDownMenu,
onMouseOut: this._handleMouseOutDropDownMenu
});
case 'RaisedButton' : case 'FlatButton' :
return React.cloneElement(currentChild, {
style: styles.button
style: this.mergeStyles(styles.button, currentChild.props.style),
});
case 'FontIcon' :
return React.cloneElement(currentChild, {
style: styles.icon.root,
style: this.mergeStyles(styles.icon.root, currentChild.props.style),
onMouseOver: this._handleMouseOverFontIcon,
onMouseOut: this._handleMouseOutFontIcon
});
Expand Down

0 comments on commit e579df5

Please sign in to comment.