summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-06-30 23:51:18 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-06-30 23:51:18 +0900
commit7c7ce072c733ef47a40e6bd72dd154d29715a9cf (patch)
tree7081f6c11c388504dcb9030855a13a0e8c44362e /packages/client/src/scripts
parentfeat(client): add rss-marquee widget (diff)
downloadsharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.tar.gz
sharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.tar.bz2
sharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.zip
chore(client): tweak ui
Diffstat (limited to 'packages/client/src/scripts')
-rw-r--r--packages/client/src/scripts/use-tooltip.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/client/src/scripts/use-tooltip.ts b/packages/client/src/scripts/use-tooltip.ts
index bc8f27a038..1f6e0fb6ce 100644
--- a/packages/client/src/scripts/use-tooltip.ts
+++ b/packages/client/src/scripts/use-tooltip.ts
@@ -3,6 +3,7 @@ import { Ref, ref, watch, onUnmounted } from 'vue';
export function useTooltip(
elRef: Ref<HTMLElement | { $el: HTMLElement } | null | undefined>,
onShow: (showing: Ref<boolean>) => void,
+ delay = 300,
): void {
let isHovering = false;
@@ -40,7 +41,7 @@ export function useTooltip(
if (isHovering) return;
if (shouldIgnoreMouseover) return;
isHovering = true;
- timeoutId = window.setTimeout(open, 300);
+ timeoutId = window.setTimeout(open, delay);
};
const onMouseleave = () => {
@@ -54,7 +55,7 @@ export function useTooltip(
shouldIgnoreMouseover = true;
if (isHovering) return;
isHovering = true;
- timeoutId = window.setTimeout(open, 300);
+ timeoutId = window.setTimeout(open, delay);
};
const onTouchend = () => {