Tweaks to atlas menu icon

This commit is contained in:
Jori Lallo
2016-07-17 17:30:03 -07:00
parent 4d81bf0fa2
commit 4628ce073e
3 changed files with 38 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ function requireAuth(nextState, replace) {
}
render((
<div style={{ display: 'flex', flex: 1, }}>
<div style={{ display: 'flex', flex: 1, minHeight: '100%', }}>
<Provider { ...stores }>
<Router history={History}>
<Route path="/" component={ Application }>

View File

@@ -139,24 +139,29 @@ class DocumentScene extends React.Component {
</CenteredContent>
) : (
<Flex flex={ true }>
{ this.store.isAtlas && sidebar && (
<div className={ styles.sidebar }>
<Tree
paddingLeft={ 10 }
tree={ toJS(this.store.atlasTree) }
onChange={ this.store.updateNavigationTree }
onCollapse={ this.store.onNodeCollapse }
isNodeCollapsed={ this.isNodeCollapsed }
renderNode={ this.renderNode }
/>
</div>
{ this.store.isAtlas && (
<Flex>
{ sidebar && (
<div className={ styles.sidebar }>
<Tree
paddingLeft={ 10 }
tree={ toJS(this.store.atlasTree) }
onChange={ this.store.updateNavigationTree }
onCollapse={ this.store.onNodeCollapse }
isNodeCollapsed={ this.isNodeCollapsed }
renderNode={ this.renderNode }
/>
</div>
) }
<div className={ styles.sidebarToggle } onClick={ toggleSidebar }>
<img
src={ require("assets/icons/menu.svg") }
className={ styles.menuIcon }
/>
</div>
</Flex>
) }
<Flex flex={ true } justify={ 'center' } className={ styles.content}>
{ this.store.isAtlas && (<img
src={ require("assets/icons/menu.svg") }
className={ styles.menuIcon }
onClick={ toggleSidebar }
/>) }
<CenteredContent>
{ this.store.updatingContent ? (
<AtlasPreviewLoading />

View File

@@ -14,15 +14,24 @@
position: relative;
}
.menuIcon {
position: absolute;
top: 22px;
left: 17px;
height: 28px;
opacity: 0.15;
.sidebarToggle {
display: flex;
position: relative;
width: 60px;
cursor: pointer;
justify-content: center;
&:hover {
opacity: 1;
background-color: #f5f5f5;
.menuIcon {
opacity: 1;
}
}
}
.menuIcon {
margin-top: 18px;
height: 28px;
opacity: 0.15;
}