mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Linter fix
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
e4a6b4f65d
commit
2dd69cbb15
@ -36,23 +36,23 @@ const NonInjectedHotbarSelector = observer(({ hotbar, hotbarManager, openCommand
|
|||||||
|
|
||||||
function clearTimer() {
|
function clearTimer() {
|
||||||
clearTimeout(tooltipTimeout.current);
|
clearTimeout(tooltipTimeout.current);
|
||||||
};
|
}
|
||||||
|
|
||||||
function onTooltipShow() {
|
function onTooltipShow() {
|
||||||
setTooltipVisible(true);
|
setTooltipVisible(true);
|
||||||
clearTimer();
|
clearTimer();
|
||||||
tooltipTimeout.current = setTimeout(() => setTooltipVisible(false), 1500);
|
tooltipTimeout.current = setTimeout(() => setTooltipVisible(false), 1500);
|
||||||
};
|
}
|
||||||
|
|
||||||
function onArrowClick(switchTo: () => void) {
|
function onArrowClick(switchTo: () => void) {
|
||||||
onTooltipShow();
|
onTooltipShow();
|
||||||
switchTo();
|
switchTo();
|
||||||
};
|
}
|
||||||
|
|
||||||
function onMouseEvent(event: React.MouseEvent) {
|
function onMouseEvent(event: React.MouseEvent) {
|
||||||
clearTimer();
|
clearTimer();
|
||||||
setTooltipVisible(event.type == "mouseenter");
|
setTooltipVisible(event.type == "mouseenter");
|
||||||
};
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.HotbarSelector}>
|
<div className={styles.HotbarSelector}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user