react-tooltip-z
Version:
Lightweight, customizable React tooltip component with hover, click, focus and manual trigger support.
22 lines (21 loc) • 604 B
TypeScript
import { TooltipPlacement } from '../types';
interface CalculateInput {
placement?: TooltipPlacement;
top?: boolean;
right?: boolean;
bottom?: boolean;
left?: boolean;
arrowCentered?: boolean;
tooltipEl: HTMLElement;
targetRect: DOMRect;
scrollX: number;
scrollY: number;
}
interface CalculateOutput {
clientTop: number | null;
clientLeft: number | null;
posPlacement: TooltipPlacement | null;
arrowPosition: number | null;
}
export declare function calculateTooltipPosition(input: CalculateInput): CalculateOutput;
export {};