@jk-core/hooks
Version:
hooks for jk
9 lines (8 loc) • 447 B
TypeScript
interface IntersectionObserverProps<T1 extends HTMLElement, T2 extends HTMLElement> {
target: React.RefObject<T1 | null>;
parent?: React.RefObject<T2 | null>;
callback: () => void;
options?: IntersectionObserverInit;
}
declare const useIntersectionObserver: <T1 extends HTMLElement, T2 extends HTMLElement>({ target, parent, callback, options, }: IntersectionObserverProps<T1, T2>) => void;
export default useIntersectionObserver;