Skip to content

Commit fb9eb33

Browse files
fixed tooltip warnings after antd upgrade
1 parent 4487b50 commit fb9eb33

File tree

6 files changed

+35
-19
lines changed

6 files changed

+35
-19
lines changed

client/packages/lowcoder-design/src/components/control.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ export const ControlPropertyViewWrapper = (
159159
<ToolTipLabel
160160
title={tooltip}
161161
label={label}
162-
overlayInnerStyle={labelTooltipOverlayInnerStyle}
162+
styles={{
163+
body: labelTooltipOverlayInnerStyle,
164+
}}
163165
/>
164166
</LabelWrapper>
165167
)}

client/packages/lowcoder-design/src/components/iconSelect/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,12 @@ export const IconSelectBase = (props: {
363363
onOpenChange={setVisible}
364364
getPopupContainer={parent ? () => parent : undefined}
365365
// hide the original background when dragging the popover is allowed
366-
overlayInnerStyle={{
367-
border: "none",
368-
boxShadow: "none",
369-
background: "transparent",
366+
styles={{
367+
body: {
368+
border: "none",
369+
boxShadow: "none",
370+
background: "transparent",
371+
}
370372
}}
371373
// when dragging is allowed, always re-location to avoid the popover exceeds the screen
372374
destroyTooltipOnHide

client/packages/lowcoder-design/src/components/popover.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ const SimplePopover = (props: {
6464
);
6565
return (
6666
<Popover
67-
overlayInnerStyle={{padding: 0}}
6867
align={{
6968
offset: [-12, 0, 0, 0],
7069
}}
@@ -74,7 +73,10 @@ const SimplePopover = (props: {
7473
open={visible}
7574
onOpenChange={setVisible}
7675
placement="left"
77-
overlayStyle={{ width: "310px" }}
76+
styles={{
77+
root: { width: "310px" },
78+
body: { padding: 0 }
79+
}}
7880
>
7981
{props.children}
8082
</Popover>
@@ -101,16 +103,18 @@ const CustomPopover = (props: {
101103
);
102104
return (
103105
<Popover
104-
overlayInnerStyle={{padding: 0}}
105106
content={contentWithBox}
106107
trigger="click"
107108
open={visible}
108109
onOpenChange={setVisible}
109110
placement={props.type === "query" ? "top" : "left"}
110-
overlayStyle={{ width: "310px" }}
111111
align={{
112112
offset: [-12, 0, 0, 0],
113113
}}
114+
styles={{
115+
root: { width: "310px" },
116+
body: { padding: 0 }
117+
}}
114118
>
115119
{props.children}
116120
</Popover>
@@ -167,8 +171,10 @@ const EditPopover = (props: EditPopoverProps) => {
167171
return (
168172
<Popover
169173
arrow={false}
170-
overlayStyle={{paddingTop: '15px'}}
171-
overlayInnerStyle={{padding: 0}}
174+
styles={{
175+
root: { paddingTop: '15px' },
176+
body: { padding: 0 }
177+
}}
172178
content={() => (
173179
<>
174180
<Wedge />

client/packages/lowcoder-design/src/components/shapeSelect/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,12 @@ export const ShapeSelectBase = (props: {
444444
onOpenChange={setVisible}
445445
getPopupContainer={parent ? () => parent : undefined}
446446
// hide the original background when dragging the popover is allowed
447-
overlayInnerStyle={{
448-
border: "none",
449-
boxShadow: "none",
450-
background: "transparent",
447+
styles={{
448+
body: {
449+
border: "none",
450+
boxShadow: "none",
451+
background: "transparent",
452+
}
451453
}}
452454
// when dragging is allowed, always re-location to avoid the popover exceeds the screen
453455
destroyTooltipOnHide

client/packages/lowcoder-design/src/components/toolTip.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const UnderlineCss = css`
155155
`;
156156

157157
function Tooltip(props: TooltipProps) {
158-
return <AntdTooltip color="#2c2c2c2" overlayInnerStyle={overlayInnerCss} {...props} />;
158+
return <AntdTooltip color="#2c2c2c2" styles={{ body: overlayInnerCss }} {...props} />;
159159
}
160160

161161
const Label = styled.div<{ $border?: boolean }>`
@@ -181,7 +181,9 @@ function ToolTipLabel(
181181
<AntdTooltip
182182
color="#2c2c2c"
183183
title={title && <TooltipTitleWrapper><>{title}</></TooltipTitleWrapper>}
184-
overlayInnerStyle={{ maxWidth: "232px", whiteSpace: "break-spaces" }}
184+
styles={{
185+
body: { maxWidth: "232px", whiteSpace: "break-spaces" }
186+
}}
185187
arrow={{
186188
pointAtCenter: true
187189
}}

client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,10 @@ function ToolbarPopover(props: {
686686
return (
687687
<Popover
688688
open={visible}
689-
overlayStyle={{ pointerEvents: "auto" }}
690-
overlayInnerStyle={{ padding: '0' }}
689+
styles={{
690+
root: { pointerEvents: "auto" },
691+
body: {padding: '0'}
692+
}}
691693
content={
692694
<div
693695
ref={popOverRef}

0 commit comments

Comments
 (0)