From 9e9745160d29c7e2b3a7f8d103ee20f17b112b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Tabille=20Manjabosco?= Date: Sun, 21 Jul 2019 20:37:54 +0200 Subject: [PATCH] fix: useMouse & useMouseHovered type definitions for SVG --- src/useMouse.ts | 2 +- src/useMouseHovered.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/useMouse.ts b/src/useMouse.ts index 6cd09c9694..99c152f245 100644 --- a/src/useMouse.ts +++ b/src/useMouse.ts @@ -11,7 +11,7 @@ export interface State { elW: number; } -const useMouse = (ref: RefObject): State => { +const useMouse = (ref: RefObject): State => { if (process.env.NODE_ENV === 'development') { if (typeof ref !== 'object' || typeof ref.current === 'undefined') { console.error('useMouse expects a single ref argument.'); diff --git a/src/useMouseHovered.ts b/src/useMouseHovered.ts index 1ae02121b3..de736afa85 100644 --- a/src/useMouseHovered.ts +++ b/src/useMouseHovered.ts @@ -9,7 +9,7 @@ export interface UseMouseHoveredOptions { const nullRef = { current: null }; -const useMouseHovered = (ref: RefObject, options: UseMouseHoveredOptions = {}): State => { +const useMouseHovered = (ref: RefObject, options: UseMouseHoveredOptions = {}): State => { const whenHovered = !!options.whenHovered; const bound = !!options.bound;