// @flow import React from 'react'; import { observer } from 'mobx-react'; import { Flex } from 'reflexbox'; import Tree from 'components/Tree'; import Separator from './components/Separator'; import styles from './Sidebar.scss'; import classNames from 'classnames/bind'; const cx = classNames.bind(styles); import SidebarStore from './SidebarStore'; type Props = { open?: boolean, onToggle: Function, navigationTree: Object, onNavigationUpdate: Function, onNodeCollapse: Function, }; @observer class Sidebar extends React.Component { props: Props; store: SidebarStore; constructor(props: Props) { super(props); this.store = new SidebarStore(); } toggleEdit = (e: MouseEvent) => { e.preventDefault(); this.store.toggleEdit(); }; render() { return ( {this.props.open && {this.store.isEditing && Drag & drop to organize   } {!this.store.isEditing ? 'Organize documents' : 'Done'} }
Menu
); } } export default Sidebar;