From 9fb6fa12590609a4cd25d2e212166c61e1c23580 Mon Sep 17 00:00:00 2001
From: Sam Nystrom <sam@samnystrom.dev>
Date: Fri, 8 Mar 2024 08:09:18 +0000
Subject: Add basic toolbar

---
 src/AddNodeMenu.tsx | 21 ---------------------
 1 file changed, 21 deletions(-)
 delete mode 100644 src/AddNodeMenu.tsx

(limited to 'src/AddNodeMenu.tsx')

diff --git a/src/AddNodeMenu.tsx b/src/AddNodeMenu.tsx
deleted file mode 100644
index 197f56d..0000000
--- a/src/AddNodeMenu.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { useId } from 'preact/hooks';
-import { NodeInfo } from './node.tsx';
-
-export interface AddNodeMenuProps {
-	nodes: Record<string, NodeInfo>;
-	onClick?: (NodeInfo) => void;
-}
-
-export const AddNodeMenu = ({ nodes, onClick = _ => {} }: AddNodeMenuProps) => {
-	const id = useId();
-	return (
-		<>
-			<menu id={id} popover>
-				{Object.entries(nodes).map(([name, node]) => (
-					<li><button onClick={() => onClick(node)}>{name}</button></li>
-				))}
-			</menu>
-			<button popoverTarget={id}>Add</button>
-		</>
-	);
-};
\ No newline at end of file
-- 
cgit v1.2.3

