UNPKG

955 BTypeScriptView Raw
1import * as React from 'react';
2import type { Modifier, Placement } from '@popperjs/core';
3import { CSSModule } from './utils';
4
5export type TooltipChildren = React.ReactNode;
6
7export interface UncontrolledTooltipProps
8 extends React.HTMLAttributes<HTMLElement> {
9 [key: string]: any;
10 target: string | HTMLElement | React.RefObject<HTMLElement>;
11 container?: string | HTMLElement | React.RefObject<HTMLElement>;
12 delay?: number | { show: number; hide: number };
13 popperClassName?: string;
14 innerClassName?: string;
15 autohide?: boolean;
16 placement?: Placement;
17 modifiers?: Modifier<string, any>[];
18 strategy?: string;
19 cssModule?: CSSModule;
20 fade?: boolean;
21 flip?: boolean;
22 children?: TooltipChildren;
23}
24
25export interface TooltipProps extends UncontrolledTooltipProps {
26 toggle?: React.MouseEventHandler<any> | (() => void);
27 isOpen?: boolean;
28}
29
30declare class Tooltip extends React.Component<TooltipProps> {}
31export default Tooltip;
32
\No newline at end of file