Skip to content

Commit f862961

Browse files
committed
update typings TSDoc
1 parent d13faae commit f862961

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

src/types.ts

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,86 +39,79 @@ export interface ITooltipArg {
3939

4040
export interface ITooltipTriggerProps {
4141
/**
42-
* whether to close the tooltip when it's trigger is out of the boundary
42+
* Whether to close the tooltip when it's trigger is out of the boundary
4343
* @default true
4444
*/
4545
closeOnOutOfBoundaries: boolean;
4646
/**
47-
* whether tooltip is shown by default
47+
* Whether tooltip is shown by default
4848
* @default false
4949
*/
5050
defaultTooltipShown: boolean;
5151
/**
52-
* delay in hiding the tooltip
52+
* Delay in hiding the tooltip
5353
* @default 0
5454
*/
5555
delayHide: number;
5656
/**
57-
* delay in showing the tooltip
57+
* Delay in showing the tooltip
5858
* @default 0
5959
*/
6060
delayShow: number;
6161
/**
62-
* whether to make the tooltip spawn at cursor position
62+
* Whether to make the tooltip spawn at cursor position
6363
* @default false
6464
*/
6565
followCursor: boolean;
6666
/**
67-
* function that can be used to obtain a tooltip element reference
67+
* Function that can be used to obtain a tooltip element reference
6868
*/
6969
getTooltipRef?: ReactPopper.RefHandler;
7070
/**
71-
* function that can be used to obtain a trigger element reference
71+
* Function that can be used to obtain a trigger element reference
7272
*/
7373
getTriggerRef?: ReactPopper.RefHandler;
7474
/**
75-
* modifiers passed directly to the underlying popper.js instance
75+
* Modifiers passed directly to the underlying popper.js instance
7676
* For more information, refer to Popper.js’ modifier docs:
7777
* @link https://popper.js.org/popper-documentation.html#modifiers
7878
*/
7979
modifiers?: PopperJS.Modifiers;
8080
/**
81-
* Popper’s placement. Valid placements are:
82-
* - auto
83-
* - top
84-
* - right
85-
* - bottom
86-
* - left
87-
* Each placement can have a variation from this list:
88-
* -start
89-
* -end
81+
* Tooltip placement w.r.t. trigger
9082
* @default right
9183
*/
9284
placement: PopperJS.Placement;
9385
/**
94-
* element to be used as portal container
86+
* Element to be used as portal container
9587
* @default document.body
9688
*/
9789
portalContainer: HTMLElement;
9890
/**
99-
* use to create controlled tooltip
91+
* Used to create controlled tooltip
10092
*/
10193
tooltipShown?: boolean;
10294
/**
103-
* the event that triggers the tooltip
95+
* Event that triggers the tooltip
10496
* @default hover
10597
*/
10698
trigger: 'none' | 'click' | 'right-click' | 'hover';
10799
/**
108-
* whether to use React.createPortal for creating tooltip
100+
* Whether to use React.createPortal for creating tooltip
101+
* @default true // for browser environments
109102
*/
110103
usePortal: boolean;
111104
/**
112-
* trigger
105+
* Trigger
113106
*/
114107
children(arg: IChildrenArg): React.ReactNode;
115108
/**
116-
* сalled when the visibility of the tooltip changes
117-
* @default noop
109+
* Called when the visibility of the tooltip changes
110+
* @default no-op
118111
*/
119112
onVisibilityChange(tooltipShown: boolean): void;
120113
/**
121-
* tooltip
114+
* Tooltip
122115
*/
123116
tooltip(arg: ITooltipArg): React.ReactNode;
124117
}

0 commit comments

Comments
 (0)