Upgrade dependencies

This commit is contained in:
Tom Moor
2018-11-06 21:58:32 -08:00
parent 690feb6040
commit 8d569fd46d
44 changed files with 2221 additions and 671 deletions

View File

@@ -27,7 +27,7 @@ const StyledNavLink = styled(NavLink)`
overflow: hidden;
text-overflow: ellipsis;
padding: 4px 0;
margin-left: ${({ icon }) => (icon ? '-20px;' : '0')};
margin-left: ${props => (props.icon ? '-20px;' : '0')};
color: ${props => props.theme.slateDark};
font-size: 15px;
cursor: pointer;
@@ -37,8 +37,6 @@ const StyledNavLink = styled(NavLink)`
}
`;
const StyledDiv = StyledNavLink.withComponent('div');
type Props = {
to?: string | Object,
onClick?: (SyntheticEvent<*>) => *,
@@ -103,26 +101,26 @@ class SidebarLink extends React.Component<Props> {
hideExpandToggle,
exact,
} = this.props;
const Component = to ? StyledNavLink : StyledDiv;
const showExpandIcon =
expandedContent && !hideExpandToggle ? true : undefined;
return (
<Wrapper menuOpen={menuOpen} column>
<Component
<StyledNavLink
icon={showExpandIcon}
activeStyle={this.activeStyle}
style={active ? this.activeStyle : undefined}
onClick={onClick}
to={to}
exact={exact !== false}
to={to}
as={to ? undefined : 'div'}
>
{icon && <IconWrapper>{icon}</IconWrapper>}
{showExpandIcon && (
<StyledGoTo expanded={this.expanded} onClick={this.handleClick} />
)}
<Content onClick={this.handleExpand}>{children}</Content>
</Component>
</StyledNavLink>
{/* Collection */ expand && hideExpandToggle && expandedContent}
{/* Document */ this.expanded && !hideExpandToggle && expandedContent}
{menu && <Action>{menu}</Action>}