summaryrefslogtreecommitdiff
path: root/components/Sidebar/index.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-11-13 01:32:10 +0100
committerGitHub <[email protected]>2021-11-13 01:32:10 +0100
commit5b6eb504587df592e42690743bce4b41d4066d00 (patch)
treef894e6997c9e0398d1ce13bb56e1964dcf129752 /components/Sidebar/index.tsx
parente214bc388e545cf695e97a3a2e714d5dbb5f25c1 (diff)
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
Diffstat (limited to 'components/Sidebar/index.tsx')
-rw-r--r--components/Sidebar/index.tsx58
1 files changed, 30 insertions, 28 deletions
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) => {
/>
)}
>
- <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>
+ {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>