From e20443bdf764432446cdae94347359dab22e1ace Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Tue, 31 Jan 2017 22:49:32 +0000 Subject: [PATCH] Add documentation. --- react-modal/index.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/react-modal/index.d.ts b/react-modal/index.d.ts index 13e4a94a0c..1a3826004a 100644 --- a/react-modal/index.d.ts +++ b/react-modal/index.d.ts @@ -8,7 +8,9 @@ declare module "react-modal" { interface ReactModal { + /* Boolean describing if the modal should be shown or not. Defaults to false. */ isOpen: boolean; + /* Object indicating styles to be used for the modal, divided into overlay and content styles. */ style?: { content?: { [key: string]: any; @@ -17,14 +19,23 @@ declare module "react-modal" { [key: string]: any; }; }; + /* Set this to properly hide your application from assistive screenreaders and other assistive technologies while the modal is open. */ appElement?: HTMLElement | {}; + /* Function that will be run after the modal has opened. */ onAfterOpen?: () => void; + /* Function that will be run when the modal is requested to be closed, prior to actually closing. */ onRequestClose?: () => void; + /* Number indicating the milliseconds to wait before closing the modal. Defaults to zero (no timeout). */ closeTimeoutMS?: number; + /* Boolean indicating if the appElement should be hidden. Defaults to true. */ ariaHideApp?: boolean; + /* Boolean indicating if the overlay should close the modal. Defaults to true. */ shouldCloseOnOverlayClick?: boolean; + /* String className to be applied to the overlay. */ overlayClassName?: string; + /* String className to be applied to the modal content. */ className?: string; + /* String indicating how the content container should be announced to screenreaders. */ contentLabel?: string; } let ReactModal: React.ClassicComponentClass;