Skip to content

Commit

Permalink
fix: useMouse & useMouseHovered type definitions for SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
ballomud committed Jul 21, 2019
1 parent ed03fc2 commit 9e97451
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/useMouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface State {
elW: number;
}

const useMouse = (ref: RefObject<HTMLElement>): State => {
const useMouse = (ref: RefObject<Element>): State => {
if (process.env.NODE_ENV === 'development') {
if (typeof ref !== 'object' || typeof ref.current === 'undefined') {
console.error('useMouse expects a single ref argument.');
Expand Down
2 changes: 1 addition & 1 deletion src/useMouseHovered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface UseMouseHoveredOptions {

const nullRef = { current: null };

const useMouseHovered = (ref: RefObject<HTMLElement>, options: UseMouseHoveredOptions = {}): State => {
const useMouseHovered = (ref: RefObject<Element>, options: UseMouseHoveredOptions = {}): State => {
const whenHovered = !!options.whenHovered;
const bound = !!options.bound;

Expand Down

0 comments on commit 9e97451

Please sign in to comment.