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>( ...@@ -35,6 +35,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
lazyMount = true, lazyMount = true,
unmountOnExit = true, unmountOnExit = true,
triggerProps, triggerProps,
closeDelay,
...rest ...rest
} = props; } = props;
...@@ -71,7 +72,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>( ...@@ -71,7 +72,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(
openDelay={ 100 } openDelay={ 100 }
// FIXME: chakra closes tooltip too fast, so Playwright is not able to make a screenshot of its content // 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 // 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 } open={ open }
onOpenChange={ handleOpenChange } onOpenChange={ handleOpenChange }
closeOnClick={ false } closeOnClick={ false }
......
...@@ -11,6 +11,7 @@ import type { ExcludeUndefined } from 'types/utils'; ...@@ -11,6 +11,7 @@ import type { ExcludeUndefined } from 'types/utils';
import { route } from 'nextjs-routes'; import { route } from 'nextjs-routes';
import config from 'configs/app'; import config from 'configs/app';
import { SECOND } from 'lib/consts';
import dayjs from 'lib/date/dayjs'; import dayjs from 'lib/date/dayjs';
import { Link } from 'toolkit/chakra/link'; import { Link } from 'toolkit/chakra/link';
import type { TooltipProps } from 'toolkit/chakra/tooltip'; import type { TooltipProps } from 'toolkit/chakra/tooltip';
...@@ -70,6 +71,7 @@ const GasInfoTooltip = ({ children, data, dataUpdatedAt, placement }: Props) => ...@@ -70,6 +71,7 @@ const GasInfoTooltip = ({ children, data, dataUpdatedAt, placement }: Props) =>
interactive interactive
showArrow={ false } showArrow={ false }
contentProps={{ p: 4, borderRadius: 'md' }} contentProps={{ p: 4, borderRadius: 'md' }}
closeDelay={ SECOND }
> >
{ children } { children }
</Tooltip> </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