Closes #667 - React warning in development

This commit is contained in:
Tom Moor 2018-06-04 21:13:42 -07:00
parent 22e823df9a
commit 97c2d8dffc
1 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ const StyledNavLink = styled(NavLink)`
overflow: hidden;
text-overflow: ellipsis;
padding: 4px 0;
margin-left: ${({ iconVisible }) => (iconVisible ? '-20px;' : '0')};
margin-left: ${({ icon }) => (icon ? '-20px;' : '0')};
color: ${color.slateDark};
font-size: 15px;
cursor: pointer;
@ -97,12 +97,13 @@ class SidebarLink extends React.Component<Props> {
hideExpandToggle,
} = this.props;
const Component = to ? StyledNavLink : StyledDiv;
const showExpandIcon = expandedContent && !hideExpandToggle;
const showExpandIcon =
expandedContent && !hideExpandToggle ? true : undefined;
return (
<Wrapper menuOpen={menuOpen} column>
<Component
iconVisible={showExpandIcon}
icon={showExpandIcon}
activeStyle={activeStyle}
style={active ? activeStyle : undefined}
onClick={onClick}