@open-condo/miniapp-utils
Version:
A set of helper functions / components / hooks used to build new condo apps fast
15 lines (13 loc) • 539 B
TypeScript
type UseIntersectionObserverOptions = {
threshold?: number;
onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
root?: Element | Document | null;
rootMargin?: string;
};
type IntersectionReturnType = {
ref: (node?: Element | null) => void;
isIntersecting: boolean;
entry?: IntersectionObserverEntry;
};
declare function useIntersectionObserver({ threshold, root, rootMargin, onChange, }?: UseIntersectionObserverOptions): IntersectionReturnType;
export { useIntersectionObserver };