1
1
import * as React from 'react' ;
2
2
import { useRef , useImperativeHandle , forwardRef } from 'react' ;
3
- import Trigger , { TriggerProps } from 'rc-trigger' ;
4
- import { AlignType , AnimationType , ActionType } from 'rc-trigger/lib/interface' ;
3
+ import Trigger from 'rc-trigger' ;
4
+ import type { TriggerProps } from 'rc-trigger' ;
5
+ import type { AlignType , AnimationType , ActionType } from 'rc-trigger/lib/interface' ;
5
6
import { placements } from './placements' ;
6
7
import Content from './Content' ;
7
8
@@ -10,8 +11,12 @@ export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'built
10
11
defaultVisible ?: boolean ;
11
12
visible ?: boolean ;
12
13
placement ?: string ;
14
+ /** @deprecated Use `motion` instead */
13
15
transitionName ?: string ;
16
+ /** @deprecated Use `motion` instead */
14
17
animation ?: AnimationType ;
18
+ /** Config popup motion */
19
+ motion ?: TriggerProps [ 'popupMotion' ] ;
15
20
onVisibleChange ?: ( visible : boolean ) => void ;
16
21
afterVisibleChange ?: ( visible : boolean ) => void ;
17
22
overlay : ( ( ) => React . ReactNode ) | React . ReactNode ;
@@ -47,6 +52,7 @@ const Tooltip = (props: TooltipProps, ref) => {
47
52
afterVisibleChange,
48
53
transitionName,
49
54
animation,
55
+ motion,
50
56
placement = 'right' ,
51
57
align = { } ,
52
58
destroyTooltipOnHide = false ,
@@ -105,6 +111,7 @@ const Tooltip = (props: TooltipProps, ref) => {
105
111
afterPopupVisibleChange = { afterVisibleChange }
106
112
popupTransitionName = { transitionName }
107
113
popupAnimation = { animation }
114
+ popupMotion = { motion }
108
115
defaultPopupVisible = { defaultVisible }
109
116
destroyPopupOnHide = { destroyTooltip }
110
117
autoDestroy = { autoDestroy }
0 commit comments