From 70e40b731209c2d7f3ffd8fb5b9adf2119585bb5 Mon Sep 17 00:00:00 2001 From: Andrew Garbuzov Date: Tue, 12 Jul 2022 12:22:44 +0300 Subject: [PATCH] Update react-tooltip.d.ts Added useful types and demo comment. --- react-tooltip.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/react-tooltip.d.ts b/react-tooltip.d.ts index a9c1732a3..0c0a84efe 100644 --- a/react-tooltip.d.ts +++ b/react-tooltip.d.ts @@ -57,15 +57,15 @@ export interface TooltipProps { // Time delay for showing popup delayShow?: number; // Custom event to trigger tooltip - event?: string; + event?: keyof HTMLElementEventMap | string; // Custom event to hide tooltip // (this requires the event prop as well) - eventOff?: string; + eventOff?: keyof HTMLElementEventMap | string; // When set to true, custom event's propagation // mode will be captue isCapture?: boolean; // Global event to hide tooltip - globalEventOff?: string; + globalEventOff?: keyof HTMLElementEventMap | string; // Function to dynamically generate the tooltip content getContent?: GetContent; // Callback after tooltip is shown @@ -109,6 +109,7 @@ export interface TooltipProps { } // ReactTooltip component is the default export +// You can overview demo examples here: https://bddeu.csb.app export default class ReactTooltip extends React.Component { // static methods static show: (target: Element) => {};