Skip to content

Commit

Permalink
AppCanvas don't set anymore position fixed on a child AppBar. Instea…
Browse files Browse the repository at this point in the history
…d, AppBar should specify it's position (witch, by default is "fixed").
  • Loading branch information
igorbt committed Aug 2, 2015
1 parent 958490b commit df16ebf
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/app-canvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,9 @@ let AppCanvas = React.createClass({
WebkitFontSmoothing: 'antialiased',
};

let newChildren = React.Children.map(this.props.children, (currentChild) => {
if (!currentChild) { // If undefined, skip it
return null;
}

switch (currentChild.type.displayName) {
case 'AppBar' :
return React.cloneElement(currentChild, {
style: this.mergeStyles({
position: 'fixed',
}, currentChild.props.style),
});
default:
return currentChild;
}
}, this);

return (
<div style={styles}>
{newChildren}
{this.props.children}
</div>
);
},
Expand Down

0 comments on commit df16ebf

Please sign in to comment.