Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #194 from storybooks/fix/container
Browse files Browse the repository at this point in the history
fix(container): fix when destructuring styles
  • Loading branch information
maximilianoforlenza authored Apr 29, 2019
2 parents d125c69 + 92d612f commit 9650557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Decorators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Container extends PureComponent {
return (
<div
onClick={onClick}
style={Object.assign({}, ...style.container)}>
style={Object.assign({}, style.container)}>
{!terminal ? this.renderToggle() : null}

<decorators.Header node={node} style={style.header}/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class NodeHeader extends Component {
const {animations, decorators, node, onClick, style} = this.props;
const {active, children} = node;
const terminal = !children;
const container = (active && style.activeLink) ? Object.assign({}, style.link, style.activeLink) : style.link;
const container = Object.assign(style.link, active ? style.activeLink : {});
const headerStyles = Object.assign({container}, style);

return (
Expand Down

0 comments on commit 9650557

Please sign in to comment.