11import * as React from 'react' ;
22import { 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' ;
56import { placements } from './placements' ;
67import Content from './Content' ;
78
@@ -10,8 +11,12 @@ export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'built
1011 defaultVisible ?: boolean ;
1112 visible ?: boolean ;
1213 placement ?: string ;
14+ /** @deprecated Use `motion` instead */
1315 transitionName ?: string ;
16+ /** @deprecated Use `motion` instead */
1417 animation ?: AnimationType ;
18+ /** Config popup motion */
19+ motion ?: TriggerProps [ 'popupMotion' ] ;
1520 onVisibleChange ?: ( visible : boolean ) => void ;
1621 afterVisibleChange ?: ( visible : boolean ) => void ;
1722 overlay : ( ( ) => React . ReactNode ) | React . ReactNode ;
@@ -47,6 +52,7 @@ const Tooltip = (props: TooltipProps, ref) => {
4752 afterVisibleChange,
4853 transitionName,
4954 animation,
55+ motion,
5056 placement = 'right' ,
5157 align = { } ,
5258 destroyTooltipOnHide = false ,
@@ -105,6 +111,7 @@ const Tooltip = (props: TooltipProps, ref) => {
105111 afterPopupVisibleChange = { afterVisibleChange }
106112 popupTransitionName = { transitionName }
107113 popupAnimation = { animation }
114+ popupMotion = { motion }
108115 defaultPopupVisible = { defaultVisible }
109116 destroyPopupOnHide = { destroyTooltip }
110117 autoDestroy = { autoDestroy }
0 commit comments