adding some delay for tooltip (#9339)

tooltips are currently instantaneous. let's add some delay for better
user experience

After investigation, it looks like the open property prevents delays
from happening. Swithcing to hidden property

See https://discord.com/channels/1130383047699738754/1324678408684306486
This commit is contained in:
Guillim
2025-01-03 18:29:08 +01:00
committed by GitHub
parent 5bd2154110
commit a0fe94d15b
5 changed files with 45 additions and 39 deletions

View File

@ -1,5 +1,5 @@
import { PlacesType, PositionStrategy, Tooltip } from 'react-tooltip';
import styled from '@emotion/styled';
import { PlacesType, PositionStrategy, Tooltip } from 'react-tooltip';
import { RGBA } from '@ui/theme/constants/Rgba';
@ -44,7 +44,7 @@ export type AppTooltipProps = {
children?: React.ReactNode;
offset?: number;
noArrow?: boolean;
isOpen?: boolean;
hidden?: boolean;
place?: PlacesType;
delay?: TooltipDelay;
positionStrategy?: PositionStrategy;
@ -55,7 +55,7 @@ export const AppTooltip = ({
anchorSelect,
className,
content,
isOpen,
hidden = false,
noArrow,
offset,
delay = TooltipDelay.mediumDelay,
@ -78,8 +78,8 @@ export const AppTooltip = ({
className,
content,
delayShow: delayInMs,
delayHide: delayInMs,
isOpen,
delayHide: 20,
hidden,
noArrow,
offset,
place,