react-chrono
Version:
A Modern Timeline component for React
17 lines • 735 B
TypeScript
import { RefObject } from 'react';
interface UseOutsideClickOptions {
eventType?: 'click' | 'mousedown' | 'touchstart';
enabled?: boolean;
preventDefault?: boolean;
stopPropagation?: boolean;
excludeRefs?: RefObject<HTMLElement | null>[];
}
/**
* Hook that triggers callback when clicking outside referenced element(s)
* @param el - The element ref(s) to check clicks outside of
* @param callback - Function to call when clicking outside
* @param options - Configuration options
*/
export default function useOutsideClick(el: RefObject<HTMLElement | null> | RefObject<HTMLElement | null>[], callback: () => void, options?: UseOutsideClickOptions): void;
export {};
//# sourceMappingURL=useOutsideClick.d.ts.map