From b92b006e2c22302e708672de97b9a05081ecca1c Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Fri, 6 Aug 2021 02:31:59 +0200 Subject: features!: context menu, better ui, and smoother updates --- components/contextmenu.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'components/contextmenu.tsx') diff --git a/components/contextmenu.tsx b/components/contextmenu.tsx index 228a780..755bd9d 100644 --- a/components/contextmenu.tsx +++ b/components/contextmenu.tsx @@ -54,6 +54,7 @@ export default interface ContextMenuProps { menuClose: () => void scope: { nodeIds: string[] } deleteNodeInEmacs: (node: OrgRoamNode) => void + createNodeInEmacs: (node: OrgRoamNode) => void } export const ContextMenu = (props: ContextMenuProps) => { @@ -67,6 +68,7 @@ export const ContextMenu = (props: ContextMenuProps) => { scope, openNodeInEmacs, deleteNodeInEmacs, + createNodeInEmacs, } = props const { isOpen, onOpen, onClose } = useDisclosure() const copyRef = useRef() @@ -104,7 +106,9 @@ export const ContextMenu = (props: ContextMenuProps) => { Open in Emacs ) : ( - }>Create node + } onClick={() => createNodeInEmacs(node)}> + Create node + )} {node?.properties.ROAM_REFS && ( }>Open in Zotero -- cgit v1.2.3