mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
react-tooltip types added.
This commit is contained in:
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
// Type definitions for react-tooltip 3.3
|
||||
// Project: https://github.com/wwayne/react-tooltip
|
||||
// Definitions by: Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
declare class ReactTooltip extends React.Component<ReactTooltip.Props> { }
|
||||
|
||||
declare namespace ReactTooltip {
|
||||
interface Offset {
|
||||
top?: number;
|
||||
right?: number;
|
||||
left?: number;
|
||||
bottom?: number;
|
||||
}
|
||||
|
||||
type ElementEvents = keyof HTMLElementEventMap;
|
||||
type WindowEvents = keyof WindowEventMap;
|
||||
|
||||
type GetContentCallback = () => React.ReactNode;
|
||||
type GetContent = GetContentCallback | [GetContentCallback, number];
|
||||
|
||||
interface Props {
|
||||
id?: string;
|
||||
place?: "top" | "right" | "bottom" | "left";
|
||||
type?: "success" | "warning" | "error" | "info" | "light";
|
||||
effect?: "float" | "solid";
|
||||
event?: ElementEvents;
|
||||
eventOff?: ElementEvents;
|
||||
globalEventOff?: WindowEvents;
|
||||
isCapture?: boolean;
|
||||
offset?: Offset;
|
||||
multiline?: boolean;
|
||||
className?: string;
|
||||
html?: boolean;
|
||||
delayHide?: number;
|
||||
delayShow?: number;
|
||||
insecure?: boolean;
|
||||
border?: boolean;
|
||||
getContent?: GetContent;
|
||||
afterShow?(): void;
|
||||
afterHide?(): void;
|
||||
disable?: boolean;
|
||||
scrollHide?: boolean;
|
||||
resizeHide?: boolean;
|
||||
wrapper?: "div" | "span";
|
||||
role?: string;
|
||||
class?: string;
|
||||
watchWindow?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = ReactTooltip;
|
||||
Reference in New Issue
Block a user