@luminati-io/uikit 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -45419,24 +45419,22 @@ var Tooltip = function Tooltip(_ref) {
|
|
45419
45419
|
_useState8 = _slicedToArray(_useState7, 2),
|
45420
45420
|
visible = _useState8[0],
|
45421
45421
|
setVisible = _useState8[1];
|
45422
|
-
var
|
45422
|
+
var hideTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
45423
45423
|
var showTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
45424
45424
|
var show = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
45425
|
-
clearTimeout(
|
45425
|
+
clearTimeout(hideTimer.current);
|
45426
45426
|
showTimer.current = setTimeout(function () {
|
45427
45427
|
return setVisible(true);
|
45428
45428
|
}, showDelay);
|
45429
45429
|
}, [showDelay]);
|
45430
45430
|
var hide = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
45431
|
-
clearTimeout(closeTimer.current);
|
45432
45431
|
clearTimeout(showTimer.current);
|
45433
|
-
|
45432
|
+
hideTimer.current = setTimeout(function () {
|
45434
45433
|
return setVisible(false);
|
45435
45434
|
}, interactive ? CLOSE_DELAY : hideDelay);
|
45436
45435
|
}, [interactive, hideDelay]);
|
45437
45436
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
45438
45437
|
return function () {
|
45439
|
-
clearTimeout(closeTimer.current);
|
45440
45438
|
clearTimeout(showTimer.current);
|
45441
45439
|
};
|
45442
45440
|
}, []);
|