Skip to content

Commit

Permalink
chore: increase tooltip click delay (#593)
Browse files Browse the repository at this point in the history
So that the message can be read on mobile
  • Loading branch information
michael1011 authored May 17, 2024
1 parent accef30 commit 8c72cf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useGlobalContext } from "../context/Global";
import "../style/tooltip.scss";

const Tooltip = ({ label }) => {
const TIMEOUT = 300;
const TIMEOUT_CLICK = 1000;
const timeout_delay = 300;
const timeout_delay_click = 2500;

const { t } = useGlobalContext();

Expand All @@ -16,7 +16,7 @@ const Tooltip = ({ label }) => {
(target.parentNode as HTMLSpanElement).classList.add("active");
timeout = setTimeout(() => {
(target.parentNode as HTMLSpanElement).classList.remove("active");
}, TIMEOUT_CLICK);
}, timeout_delay_click);
};

const tooltipEnter = (evt: MouseEvent) => {
Expand All @@ -29,7 +29,7 @@ const Tooltip = ({ label }) => {
const target = evt.currentTarget as HTMLSpanElement;
timeout = setTimeout(() => {
(target.parentNode as HTMLSpanElement).classList.remove("active");
}, TIMEOUT);
}, timeout_delay);
};

return (
Expand Down

0 comments on commit 8c72cf2

Please sign in to comment.