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