@wethegit/react-hooks
Advanced tools
Comparing version 2.0.1 to 2.0.3
@@ -52,7 +52,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime'; | ||
export declare type InViewHook = [ | ||
export declare type InViewHook<T extends HTMLElement> = [ | ||
/** | ||
* Pass this function to the `ref` prop of the DOM element you want to track visibility of. | ||
*/ | ||
(node: HTMLElement) => void, | ||
(node: T) => void, | ||
/** | ||
@@ -65,3 +65,3 @@ * Whether the target DOM element is in view, based on the provided `threshold` argument. | ||
*/ | ||
HTMLElement | undefined | ||
T | undefined | ||
]; | ||
@@ -171,3 +171,3 @@ | ||
*/ | ||
export declare function useInView(threshold?: number, once?: boolean, setInViewIfScrolledPast?: boolean): InViewHook; | ||
export declare function useInView<T extends HTMLElement>(threshold?: number, once?: boolean, setInViewIfScrolledPast?: boolean): InViewHook<T>; | ||
@@ -174,0 +174,0 @@ /** |
{ | ||
"name": "@wethegit/react-hooks", | ||
"version": "2.0.1", | ||
"version": "2.0.3", | ||
"description": "A collection of helpers for use in React projects.", | ||
@@ -5,0 +5,0 @@ "files": [ |
16134