import React, { ReactNode } from 'react'; interface TooltipProps { children: ReactNode; content: string; position?: 'top' | 'bottom' | 'left' | 'right'; className?: string; // For extra styling on the wrapper } export const Tooltip: React.FC = ({ children, content, position = 'top', className = '' }) => { const positionClasses = { top: 'bottom-full left-1/2 -translate-x-1/2 mb-2', bottom: 'top-full left-1/2 -translate-x-1/2 mt-2', left: 'right-full top-1/2 -translate-y-1/2 mr-2', right: 'left-full top-1/2 -translate-y-1/2 ml-2', }; return (
{children}
{content} {/* Arrow */} {/*
Optional */}
); };