/* Copyright 2026 Marimo. All rights reserved. */ import { TooltipContent, TooltipPortal, TooltipRoot, TooltipTrigger, } from "@/components/ui/tooltip"; import type { HoverTooltipState } from "./use-table-hover-tooltip"; interface HoverTooltipProps { state: HoverTooltipState | null; contentId: string; onClose: () => void; } /** * A single radix tooltip whose anchor is repositioned to the hovered cell. * Rendering one instance per table (instead of one per cell) keeps the cost * constant regardless of how many cells are on screen. */ export const HoverTooltip = ({ state, contentId, onClose, }: HoverTooltipProps) => { return ( { if (!open) { onClose(); } }} delayDuration={0} disableHoverableContent={true} >
{state?.content} ); };