Restore stickyness of …

This commit is contained in:
Tom Moor 2018-05-06 00:06:36 -07:00
parent b37241229c
commit c3d7f0785c
2 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,6 @@ class CollectionLink extends React.Component<Props> {
history={history}
collectionId={collection.id}
activeClassName="activeDropZone"
menuOpen={this.menuOpen}
>
<SidebarLink
key={collection.id}
@ -50,6 +49,7 @@ class CollectionLink extends React.Component<Props> {
iconColor={collection.color}
expand={expanded}
hideExpandToggle
menuOpen={this.menuOpen}
expandedContent={
<CollectionChildren column>
{collection.documents.map(document => (

View File

@ -53,6 +53,7 @@ type Props = {
expand?: boolean,
expandedContent?: React.Node,
menu?: React.Node,
menuOpen?: boolean,
hideExpandToggle?: boolean,
iconColor?: string,
active?: boolean,
@ -92,13 +93,14 @@ class SidebarLink extends React.Component<Props> {
expand,
active,
menu,
menuOpen,
hideExpandToggle,
} = this.props;
const Component = to ? StyledNavLink : StyledDiv;
const showExpandIcon = expandedContent && !hideExpandToggle;
return (
<Wrapper column>
<Wrapper menuOpen={menuOpen} column>
<Component
iconVisible={showExpandIcon}
activeStyle={activeStyle}
@ -124,7 +126,7 @@ class SidebarLink extends React.Component<Props> {
const Action = styled.span`
position: absolute;
right: 0;
top: 0;
top: 2px;
color: ${color.slate};
svg {
opacity: 0.75;