import React, { ReactNode } from 'react'; import { cn } from '../../utils/classNames'; type TooltipSide = 'top' | 'bottom' | 'left' | 'right'; interface TooltipProps { label: ReactNode; side?: TooltipSide; children: ReactNode; className?: string; } const sideClasses: Record = { top: 'bottom-full left-1/2 mb-2 -translate-x-1/2', bottom: 'top-full left-1/2 mt-2 -translate-x-1/2', left: 'right-full top-1/2 mr-2 -translate-y-1/2', right: 'left-full top-1/2 ml-2 -translate-y-1/2', }; /** * Lightweight CSS tooltip (hover + keyboard focus). Wrap any focusable trigger. * The bubble uses the inverted text/bg tokens so it themes automatically. */ const Tooltip: React.FC = ({ label, side = 'top', children, className }) => ( {children} {label} ); export default Tooltip;