import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "@rakazo/ui-web"; import type { ReactNode } from "react"; import type { ContextMenuPosition } from "../BotContextMenu"; /** A dropdown menu opened at the pointer, for sidebar context menus. */ export function PointerMenu({ position, label, onClose, children, }: { position: ContextMenuPosition; label: string; onClose: () => void; children: ReactNode; }) { return ( { if (!open) onClose(); }} > {/* Invisible anchor at the pointer position, mirroring the bot menu. */} } /> {children} ); }