Skip to content

Commit

Permalink
Fix #4109: Make the options parameter of useIntersectionObserver hook…
Browse files Browse the repository at this point in the history
… optional
  • Loading branch information
ulasturann committed Mar 1, 2023
1 parent 0969c84 commit cea0adb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/lib/hooks/hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ export declare function useMove(mode: 'horizontal' | 'vertical' | 'both', initia
export declare function useFavicon(newIcon: string, rel: string): void;
/**
* Custom hook to use change the current favicon.
* @param {React.RefObject<Element>} ref - The ref of the element to observe.
* @param {IntersectionObserver} options - The options of the intersection observer.
* @param {React.RefObject<Element>} ref The ref of the element to observe.
* @param {IntersectionObserver} options The options of the intersection observer.
* @return {boolean} Whether the element is intersecting or not.
*/
export declare function useIntersectionObserver(ref: React.RefObject<Element>, options: IntersectionObserver): void;
export declare function useIntersectionObserver(ref: React.RefObject<Element>, options?: IntersectionObserver): boolean;
/**
* Custom hook to use detect click outside.
* @param {React.RefObject<Element>} ref - The ref of the element to detect click outside.
Expand Down

0 comments on commit cea0adb

Please sign in to comment.