UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

45 lines 1.65 kB
import { ReactNode } from 'react'; /** * Tooltip position options */ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right'; /** * Tooltip component props interface */ export interface TooltipProps { /** Content to display in the tooltip */ content: ReactNode; /** Element that triggers the tooltip */ children: ReactNode; /** Position of the tooltip relative to the trigger */ position?: TooltipPosition; /** Additional className for the tooltip container */ className?: string; /** Additional className for the tooltip content */ contentClassName?: string; /** Whether the tooltip is disabled */ disabled?: boolean; /** * Render the tooltip inside a React Portal attached to document.body. * Use this when the trigger lives inside an ancestor with `overflow:hidden` * (e.g. scroll containers) that would otherwise clip the tooltip. */ usePortal?: boolean; } /** * Tooltip component - Displays contextual information on hover/focus * * By default uses a CSS-only approach with `group-hover` for performance. * When `usePortal` is true, the tooltip is rendered in a React Portal so it * escapes ancestors with `overflow:hidden`. * * @example * ```tsx * <Tooltip content="Desempenho baseado nas atividades"> * <Info size={18} weight="bold" className="text-text-950 cursor-pointer" /> * </Tooltip> * ``` */ export declare function Tooltip({ content, children, position, className, contentClassName, disabled, usePortal, }: Readonly<TooltipProps>): import("react/jsx-runtime").JSX.Element; export default Tooltip; //# sourceMappingURL=Tooltip.d.ts.map