import { IconInfoCircle } from '@tabler/icons-react' import { useState } from 'react' interface InfoTooltipProps { text: string className?: string // Which side of the icon the tooltip pops toward. Defaults to 'top' (existing behavior); // use 'bottom' when the icon sits near the top of the viewport so it isn't clipped. position?: 'top' | 'bottom' // Horizontal anchoring. 'center' (default) centers the bubble on the icon. Use 'right' when // the icon sits near the right edge so the bubble expands leftward into open space instead of // being squeezed against the viewport edge (which forces one-word-per-line wrapping). align?: 'center' | 'right' } export default function InfoTooltip({ text, className = '', position = 'top', align = 'center', }: InfoTooltipProps) { const [isVisible, setIsVisible] = useState(false) return ( {isVisible && (
{text}
)} ) }