chore: update Tooltip arrowPointAtCenter deprecated warning (#43761)

This commit is contained in:
afc163 2023-07-24 18:28:58 +08:00 committed by GitHub
parent bed26741aa
commit 1e68b89a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ export interface AbstractTooltipProps extends LegacyTooltipProps {
placement?: TooltipPlacement; placement?: TooltipPlacement;
builtinPlacements?: typeof Placements; builtinPlacements?: typeof Placements;
openClassName?: string; openClassName?: string;
/** @deprecated Please use `arrow` instead. */ /** @deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
arrowPointAtCenter?: boolean; arrowPointAtCenter?: boolean;
arrow?: arrow?:
| boolean | boolean
@ -240,7 +240,7 @@ const Tooltip = React.forwardRef<TooltipRef, TooltipProps>((props, ref) => {
['defaultVisible', 'defaultOpen'], ['defaultVisible', 'defaultOpen'],
['onVisibleChange', 'onOpenChange'], ['onVisibleChange', 'onOpenChange'],
['afterVisibleChange', 'afterOpenChange'], ['afterVisibleChange', 'afterOpenChange'],
['arrowPointAtCenter', 'arrow'], ['arrowPointAtCenter', 'arrow={{ pointAtCenter: true }}'],
].forEach(([deprecatedName, newName]) => { ].forEach(([deprecatedName, newName]) => {
warning( warning(
!(deprecatedName in props), !(deprecatedName in props),