Skip to content

Commit 70e40b7

Browse files
authored
Update react-tooltip.d.ts
Added useful types and demo comment.
1 parent 064249c commit 70e40b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

react-tooltip.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ export interface TooltipProps {
5757
// Time delay for showing popup
5858
delayShow?: number;
5959
// Custom event to trigger tooltip
60-
event?: string;
60+
event?: keyof HTMLElementEventMap | string;
6161
// Custom event to hide tooltip
6262
// (this requires the event prop as well)
63-
eventOff?: string;
63+
eventOff?: keyof HTMLElementEventMap | string;
6464
// When set to true, custom event's propagation
6565
// mode will be captue
6666
isCapture?: boolean;
6767
// Global event to hide tooltip
68-
globalEventOff?: string;
68+
globalEventOff?: keyof HTMLElementEventMap | string;
6969
// Function to dynamically generate the tooltip content
7070
getContent?: GetContent;
7171
// Callback after tooltip is shown
@@ -109,6 +109,7 @@ export interface TooltipProps {
109109
}
110110

111111
// ReactTooltip component is the default export
112+
// You can overview demo examples here: https://bddeu.csb.app
112113
export default class ReactTooltip extends React.Component<TooltipProps> {
113114
// static methods
114115
static show: (target: Element) => {};

0 commit comments

Comments
 (0)