Commit 4ea00c0f authored by tom's avatar tom

increase close delay for gas info tooltip

parent 123d5534
......@@ -35,6 +35,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
lazyMount = true,
unmountOnExit = true,
triggerProps,
closeDelay,
...rest
} = props;
......@@ -71,7 +72,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
openDelay={ 100 }
// FIXME: chakra closes tooltip too fast, so Playwright is not able to make a screenshot of its content
// so we need to increase the close delay in Playwright environment
closeDelay={ config.app.isPw ? 10_000 : 100 }
closeDelay={ config.app.isPw ? 10_000 : closeDelay ?? 100 }
open={ open }
onOpenChange={ handleOpenChange }
closeOnClick={ false }
......
......@@ -11,6 +11,7 @@ import type { ExcludeUndefined } from 'types/utils';
import { route } from 'nextjs-routes';
import config from 'configs/app';
import { SECOND } from 'lib/consts';
import dayjs from 'lib/date/dayjs';
import { Link } from 'toolkit/chakra/link';
import type { TooltipProps } from 'toolkit/chakra/tooltip';
......@@ -70,6 +71,7 @@ const GasInfoTooltip = ({ children, data, dataUpdatedAt, placement }: Props) =>
interactive
showArrow={ false }
contentProps={{ p: 4, borderRadius: 'md' }}
closeDelay={ SECOND }
>
{ children }
</Tooltip>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment