UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

10 lines (9 loc) 714 B
/** * Detects when a user clicks outside of the element * @param {object} coachmarkRef - The ref to the React element for the Coachmark to detect when the user clicks outside of its bounds. * @param {object} overlayRef - The ref to the React element for the CoachmarkOverlay to detect when the user clicks outside of its bounds. * @param {string} overlayKind - The overlayKind prop from the Coachmark. @see COACHMARK_OVERLAY_KIND * @param {Function} callback The callback to call when the user mouses down. */ export function useClickOutsideElement(coachmarkRef: object, overlayRef: object, overlayKind: string, callback: Function): void; export function useWindowEvent(eventName: any, callback: any): void;