Improved sidebar selected styling, simplified logic and css

This commit is contained in:
Tom Moor
2019-01-06 16:12:07 -08:00
parent 12e324d34c
commit b9765fb59e
11 changed files with 188 additions and 176 deletions

View File

@@ -7,8 +7,9 @@ import { HomeIcon, EditIcon, SearchIcon, StarredIcon } from 'outline-icons';
import Flex from 'shared/components/Flex';
import AccountMenu from 'menus/AccountMenu';
import Sidebar, { Section } from './Sidebar';
import Sidebar from './Sidebar';
import Scrollable from 'components/Scrollable';
import Section from './components/Section';
import Collections from './components/Collections';
import SidebarLink from './components/SidebarLink';
import HeaderBlock from './components/HeaderBlock';
@@ -56,24 +57,31 @@ class MainSidebar extends React.Component<Props> {
<Flex auto column>
<Scrollable shadow>
<Section>
<SidebarLink to="/dashboard" icon={<HomeIcon />} exact={false}>
Home
</SidebarLink>
<SidebarLink to="/search" icon={<SearchIcon />}>
Search
</SidebarLink>
<SidebarLink to="/starred" icon={<StarredIcon />} exact={false}>
Starred
</SidebarLink>
<SidebarLink
to="/dashboard"
icon={<HomeIcon />}
exact={false}
label="Home"
/>
<SidebarLink to="/search" icon={<SearchIcon />} label="Search" />
<SidebarLink
to="/starred"
icon={<StarredIcon />}
exact={false}
label="Starred"
/>
<SidebarLink
to="/drafts"
icon={<EditIcon />}
active={
documents.active ? !documents.active.publishedAt : undefined
}
>
Drafts <Bubble count={documents.drafts.length} />
</SidebarLink>
label={
<React.Fragment>
Drafts <Bubble count={documents.drafts.length} />
</React.Fragment>
}
/>
</Section>
<Section>
<Collections