Skip to content

Commit 69db52f

Browse files
committed
add a transparent area to keep tooltip open when transitioning from text to tooltip box
1 parent 9fdf3a3 commit 69db52f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/components/Tooltip.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ const Tooltip: React.FC<IProps> = ({ content, children }) => {
8484
},
8585
}}
8686
>
87+
{/* This box is used as an area to keep the tooltip open when transitioning from the children content into the tooltip box content */}
88+
<Box
89+
as="span"
90+
position="absolute"
91+
bg="transparent"
92+
bottom={-2}
93+
left={0}
94+
width="100%"
95+
height={5}
96+
/>
8797
<Box
8898
as="span"
8999
position="absolute"

0 commit comments

Comments
 (0)