Combined documents and collections in the sidepanel

This commit is contained in:
Jori Lallo
2017-09-17 23:45:40 -07:00
parent 53c0c9180b
commit 0a5f5712ef
13 changed files with 254 additions and 223 deletions

View File

@ -0,0 +1,32 @@
// @flow
import React from 'react';
import { NavLink } from 'react-router-dom';
import { layout, color, fontWeight } from 'styles/constants';
import styled from 'styled-components';
const activeStyle = {
color: color.black,
fontWeight: fontWeight.semiBold,
};
// $FlowFixMe :/
const styleComponent = component => styled(component)`
display: block;
overflow: hidden;
text-overflow: ellipsis;
margin: 5px ${layout.hpadding};
color: ${color.slateDark};
font-size: 15px;
cursor: pointer;
&:hover {
color: ${color.text};
}
`;
function SidebarLink(props: Object) {
const Component = styleComponent(props.to ? NavLink : 'div');
return <Component exact activeStyle={activeStyle} {...props} />;
}
export default SidebarLink;