From f21c237d62952224987170f655cc85082a8758ff Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 24 Sep 2017 22:38:53 -0700 Subject: [PATCH] Fixes new document menu not working Fixes styling when drag and dropping into sidebar --- .../Layout/components/SidebarCollections.js | 21 ++++++++++--------- frontend/styles/base.css | 8 +++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/frontend/components/Layout/components/SidebarCollections.js b/frontend/components/Layout/components/SidebarCollections.js index 9bd931514..3544e3040 100644 --- a/frontend/components/Layout/components/SidebarCollections.js +++ b/frontend/components/Layout/components/SidebarCollections.js @@ -24,16 +24,11 @@ type Props = { ui: UiStore, }; -const activeStyle = { - color: color.black, - background: color.slateDark, -}; - @observer class SidebarCollections extends React.PureComponent { props: Props; render() { - const { collections, activeDocument, ui } = this.props; + const { history, collections, activeDocument, ui } = this.props; return ( @@ -41,6 +36,7 @@ const activeStyle = { {collections.data.map(collection => ( @@ -83,6 +80,7 @@ const activeStyle = { {(this.isHovering || this.menuOpen) && (this.menuOpen = true)} onClose={() => (this.menuOpen = false)} @@ -93,6 +91,7 @@ const activeStyle = { collection.documents.map(document => ( { - const { document, activeDocument, depth } = props; + const { history, document, activeDocument, depth } = props; const canDropToImport = depth === 0; return ( @@ -120,7 +120,7 @@ const DocumentLink = observer((props: DocumentLinkProps) => { {document.title} } @@ -137,6 +137,7 @@ const DocumentLink = observer((props: DocumentLinkProps) => { document.children.map(childDocument => ( diff --git a/frontend/styles/base.css b/frontend/styles/base.css index 52f316ae8..27eabf039 100644 --- a/frontend/styles/base.css +++ b/frontend/styles/base.css @@ -129,3 +129,11 @@ hr { padding: 1em; border-radius: 0.25em; } + +.activeDropZone { + background: #4E5C6E; +} + +.activeDropZone a { + color: #FFF !important; +}