summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/Sidebar/Title.tsx25
-rw-r--r--components/contextmenu.tsx4
2 files changed, 29 insertions, 0 deletions
diff --git a/components/Sidebar/Title.tsx b/components/Sidebar/Title.tsx
new file mode 100644
index 0000000..5d39190
--- /dev/null
+++ b/components/Sidebar/Title.tsx
@@ -0,0 +1,25 @@
+import { Flex, Heading } from '@chakra-ui/react'
+import React from 'react'
+import { BiFile } from 'react-icons/bi'
+
+import { OrgRoamNode } from '../../api'
+export interface TitleProps {
+ previewNode: OrgRoamNode
+}
+
+export const Title = (props: TitleProps) => {
+ const { previewNode } = props
+ return (
+ <Flex maxW="90%">
+ {/* <BiFile
+ * // onContextMenu={(e) => {
+ * // e.preventDefault()
+ * // openContextMenu(previewNode, e)
+ * // }}
+ * /> */}
+ <Heading lineHeight={1.2} size="md" fontWeight={600} pt={4}>
+ {previewNode?.title}
+ </Heading>
+ </Flex>
+ )
+}
diff --git a/components/contextmenu.tsx b/components/contextmenu.tsx
index 77deb48..54a8c85 100644
--- a/components/contextmenu.tsx
+++ b/components/contextmenu.tsx
@@ -40,6 +40,7 @@ import {
ExternalLinkIcon,
ChevronRightIcon,
PlusSquareIcon,
+ MinusIcon,
} from '@chakra-ui/icons'
import { OrgRoamGraphReponse, OrgRoamLink, OrgRoamNode } from '../api'
@@ -119,6 +120,9 @@ export const ContextMenu = (props: ContextMenuProps) => {
>
Open local graph for this node
</MenuItem>
+ <MenuItem onClick={() => handleLocal(target!, 'remove')} icon={<MinusIcon />}>
+ Exclude node from local graph
+ </MenuItem>
</>
)}
{!target?.properties?.FILELESS ? (