From 6b9e979b6454c5564b3301a3006e5b74992d5940 Mon Sep 17 00:00:00 2001 From: dengfuping Date: Sun, 24 Sep 2023 16:43:09 +0800 Subject: [PATCH] improve(design): Tooltip light style in dark theme --- packages/design/src/tooltip/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/design/src/tooltip/index.tsx b/packages/design/src/tooltip/index.tsx index 5d3c29530..b9ff5ded3 100644 --- a/packages/design/src/tooltip/index.tsx +++ b/packages/design/src/tooltip/index.tsx @@ -24,7 +24,7 @@ export const getTooltipTypeList = () => [ { type: 'light', color: token.colorText, - backgroundColor: '#ffffff', + backgroundColor: token.colorBgElevated, }, { type: 'success', @@ -89,11 +89,11 @@ const Tooltip: CompoundedComponent = ({ }; const hasCloseIcon = !!closeIcon; + const CloseIconNode = useMemo(() => { if (!hasCloseIcon) { return null; } - return closeIcon === true ? ( ) : ( @@ -132,8 +132,8 @@ const Tooltip: CompoundedComponent = ({ title={hasCloseIcon ? titleWithCloseIcon : title} color={color || typeItem?.backgroundColor} open={open} - onOpenChange={open => { - setInnerOpen(open); + onOpenChange={newOpen => { + setInnerOpen(newOpen); }} overlayInnerStyle={{ color: typeItem?.color,