import React from 'react'; import cx from 'classnames'; import { Tooltip as UITooltip, TooltipAnchor as UITooltipAnchor, TooltipArrow as UITooltipArrow, useTooltipState, } from 'ariakit/tooltip'; import css from './tooltip.module.css'; interface TooltipProps { className?: string; tooltipClassName?: string; title?: React.ReactNode; as?: T; containerRef?: React.RefObject; } export const Tooltip = ( props: TooltipProps & Omit, keyof TooltipProps>, ) => { const { className = '', tooltipClassName = '', title = '', as: Component = 'span', containerRef: ref, ...restProps } = props; const tooltip = useTooltipState({ placement: 'top', timeout: 300 }); return ( <> {title && ( {title} )} ); };