UNPKG

886 BTypeScriptView Raw
1import * as React from 'react';
2import { Config, PopperOptions, PropsGetterArgs } from './types';
3export declare function usePopperTooltip(config?: Config, popperOptions?: PopperOptions): {
4 state: import("@popperjs/core").State | null;
5 update: (() => Promise<Partial<import("@popperjs/core").State>>) | null;
6 forceUpdate: (() => void) | null;
7 getArrowProps: (args?: PropsGetterArgs) => {
8 style: React.CSSProperties;
9 'data-popper-arrow': boolean;
10 };
11 getTooltipProps: (args?: PropsGetterArgs) => {
12 'data-popper-interactive': boolean | undefined;
13 style: React.CSSProperties;
14 };
15 setTooltipRef: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
16 setTriggerRef: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
17 tooltipRef: HTMLElement | null;
18 triggerRef: HTMLElement | null;
19 visible: boolean;
20};