import type { ReactNode } from 'react'; import React from 'react'; import { Provider, Root, Trigger, Content, Arrow, } from '@radix-ui/react-tooltip'; export interface TooltipProps { children: React.ReactElement; description?: string | ReactNode; open?: boolean; align?: 'start' | 'center' | 'end'; } // Conditionally rendered tooltip if description content is provided. export const Tooltip = ({ children, description, open, align }: TooltipProps) => description ? ( {children}
{description}
) : ( children );