From 5b6eb504587df592e42690743bce4b41d4066d00 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 13 Nov 2021 01:32:10 +0100 Subject: Feat: Markdown file previewing (#152) * feat(md): initial support for md-roam * feat(md): link support and more for md * fix(md): add missing remark math package --- components/Sidebar/index.tsx | 58 +++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'components/Sidebar/index.tsx') diff --git a/components/Sidebar/index.tsx b/components/Sidebar/index.tsx index 21465c6..141c26d 100644 --- a/components/Sidebar/index.tsx +++ b/components/Sidebar/index.tsx @@ -199,34 +199,36 @@ const Sidebar = (props: SidebarProps) => { /> )} > - - - <TagBar - {...{ filter, setFilter, tagColors, setTagColors, openContextMenu, previewNode }} - /> - <Note - {...{ - setPreviewNode, - previewNode, - nodeById, - nodeByCite, - setSidebarHighlightedNode, - justification, - justificationList, - linksByNodeId, - openContextMenu, - outline, - setOutline, - collapse, - }} - /> - </VStack> + {previewRoamNode && ( + <VStack + flexGrow={1} + // overflowY="scroll" + alignItems="left" + bg="alt.100" + paddingLeft={4} + > + <Title previewNode={previewRoamNode} /> + <TagBar + {...{ filter, setFilter, tagColors, setTagColors, openContextMenu, previewNode }} + /> + <Note + {...{ + setPreviewNode, + previewNode, + nodeById, + nodeByCite, + setSidebarHighlightedNode, + justification, + justificationList, + linksByNodeId, + openContextMenu, + outline, + setOutline, + collapse, + }} + /> + </VStack> + )} </Scrollbars> </Flex> </Resizable> -- cgit v1.2.3