import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@/src/components/ui/hover-card"; import { HoverCardPortal } from "@radix-ui/react-hover-card"; import { SelectItem } from "@/src/components/ui/select"; import * as React from "react"; interface PropertyHoverCardProps { label: string; description?: string; unit?: string; type?: string; children: React.ReactNode; } export const PropertyHoverCard = ({ label, description, unit, type, children, }: PropertyHoverCardProps) => { return ( {children}
{label}
{(unit || type) && (
{unit && ( Unit: {unit} )} {type && ( Type: {type} )}
)} {description &&

{description}

}
); }; /** * Generic SelectItem with a hover-card that shows documentation for a widget property * (view, metric, dimension). */ export const WidgetPropertySelectItem = ({ value, label, description, unit, type, className, }: { value: string; label: string; description?: string; unit?: string; type?: string; className?: string; }) => { return ( {label} ); };