From 06e162f8e4c26ba46bc0a6380000e48613d2d5e7 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Tue, 3 Dec 2024 09:50:45 +0800 Subject: [PATCH 1/3] type: add deprecated info for overlayClassName --- README.md | 2 +- src/Tooltip.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4440ceb..c19dde9 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Online demo: | afterVisibleChange | (visible: boolean) => void; | | Callback after visible change | | overlay | ReactNode \| () => ReactNode | | tooltip overlay content | | overlayStyle | object | | deprecated, Please use `styles={{ root: {} }}` | -| overlayClassName | string | | className of tooltip overlay | +| overlayClassName | string | | deprecated Please use `classNames={{ root: {} }} ` | | prefixCls | string | 'rc-tooltip' | prefix class name of tooltip | | mouseEnterDelay | number | 0 | delay time (in second) before tooltip shows when mouse enter | | mouseLeaveDelay | number | 0.1 | delay time (in second) before tooltip hides when mouse leave | diff --git a/src/Tooltip.tsx b/src/Tooltip.tsx index f422740..d096239 100644 --- a/src/Tooltip.tsx +++ b/src/Tooltip.tsx @@ -35,6 +35,7 @@ export interface TooltipProps overlay: (() => React.ReactNode) | React.ReactNode; /** @deprecated Please use `styles={{ root: {} }}` */ overlayStyle?: React.CSSProperties; + /** @deprecated Please use `classNames={{ root: {} }}` */ overlayClassName?: string; getTooltipContainer?: (node: HTMLElement) => HTMLElement; destroyTooltipOnHide?: boolean; From 8a82cac4ec89ce29535d31dbe6f7a06a5376d450 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Tue, 3 Dec 2024 09:51:44 +0800 Subject: [PATCH 2/3] fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c19dde9..89d14ed 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Online demo: | afterVisibleChange | (visible: boolean) => void; | | Callback after visible change | | overlay | ReactNode \| () => ReactNode | | tooltip overlay content | | overlayStyle | object | | deprecated, Please use `styles={{ root: {} }}` | -| overlayClassName | string | | deprecated Please use `classNames={{ root: {} }} ` | +| overlayClassName | string | | deprecated Please use `classNames={{ root: {} }}` | | prefixCls | string | 'rc-tooltip' | prefix class name of tooltip | | mouseEnterDelay | number | 0 | delay time (in second) before tooltip shows when mouse enter | | mouseLeaveDelay | number | 0.1 | delay time (in second) before tooltip hides when mouse leave | From ea93db3c54514f2e4d0912d7d76f72f1dc8213f9 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Tue, 3 Dec 2024 09:52:46 +0800 Subject: [PATCH 3/3] fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89d14ed..eb93e11 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Online demo: | afterVisibleChange | (visible: boolean) => void; | | Callback after visible change | | overlay | ReactNode \| () => ReactNode | | tooltip overlay content | | overlayStyle | object | | deprecated, Please use `styles={{ root: {} }}` | -| overlayClassName | string | | deprecated Please use `classNames={{ root: {} }}` | +| overlayClassName | string | | deprecated, Please use `classNames={{ root: {} }}` | | prefixCls | string | 'rc-tooltip' | prefix class name of tooltip | | mouseEnterDelay | number | 0 | delay time (in second) before tooltip shows when mouse enter | | mouseLeaveDelay | number | 0.1 | delay time (in second) before tooltip hides when mouse leave |