use-intersection.d.ts 453 B

123456789
  1. /// <reference types="react" />
  2. declare type UseIntersectionObserverInit = Pick<IntersectionObserverInit, 'rootMargin' | 'root'>;
  3. declare type UseIntersection = {
  4. disabled?: boolean;
  5. } & UseIntersectionObserverInit & {
  6. rootRef?: React.RefObject<HTMLElement> | null;
  7. };
  8. export declare function useIntersection<T extends Element>({ rootRef, rootMargin, disabled, }: UseIntersection): [(element: T | null) => void, boolean, () => void];
  9. export {};