Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101811785
useRootClose.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 13, 23:23
Size
958 B
Mime Type
text/x-java
Expires
Sat, Feb 15, 23:23 (2 d)
Engine
blob
Format
Raw Data
Handle
24233446
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
useRootClose.d.ts
View Options
/// <reference types="react" />
import { ClickOutsideOptions } from './useClickOutside';
export interface RootCloseOptions extends ClickOutsideOptions {
disabled?: boolean;
}
/**
* The `useRootClose` hook registers your callback on the document
* when rendered. Powers the `<Overlay/>` component. This is used achieve modal
* style behavior where your callback is triggered when the user tries to
* interact with the rest of the document or hits the `esc` key.
*
* @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
* @param {function} onRootClose
* @param {object=} options
* @param {boolean=} options.disabled
* @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
*/
declare function useRootClose(ref: React.RefObject<Element> | Element | null | undefined, onRootClose: (e: Event) => void, { disabled, clickTrigger }?: RootCloseOptions): void;
export default useRootClose;
Event Timeline
Log In to Comment