UNPKG

1.96 kBTypeScriptView Raw
1import * as React from 'react';
2import { Sizes, TransitionCallbacks } from 'react-bootstrap';
3import ModalBody = require('./ModalBody');
4import ModalHeader = require('./ModalHeader');
5import ModalTitle = require('./ModalTitle');
6import ModalDialog = require('./ModalDialog');
7import ModalFooter = require('./ModalFooter');
8
9declare namespace Modal {
10 interface ModalProps extends TransitionCallbacks, React.HTMLProps<Modal> {
11 // Required
12 onHide: Function;
13
14 // Optional
15 animation?: boolean | undefined;
16 autoFocus?: boolean | undefined;
17 backdrop?: boolean | string | undefined;
18 backdropClassName?: string | undefined;
19 backdropStyle?: any;
20 backdropTransitionTimeout?: number | undefined;
21 bsSize?: Sizes | undefined;
22 bsClass?: string | undefined;
23 container?: any; // TODO: Add more specific type
24 containerClassName?: string | undefined;
25 dialogClassName?: string | undefined;
26 dialogComponent?: any; // TODO: Add more specific type
27 dialogTransitionTimeout?: number | undefined;
28 enforceFocus?: boolean | undefined;
29 restoreFocus?: boolean | undefined;
30 keyboard?: boolean | undefined;
31 onBackdropClick?: ((node: HTMLElement) => any) | undefined;
32 onEscapeKeyDown?: ((node: HTMLElement) => any) | undefined;
33 /**
34 * @deprecated since Sept 25, 2017, use onEscapeKeyDown instead
35 **/
36 onEscapeKeyUp?: ((node: HTMLElement) => any) | undefined;
37 onShow?: ((node: HTMLElement) => any) | undefined;
38 show?: boolean | undefined;
39 transition?: React.ReactElement | undefined;
40 }
41}
42declare class Modal extends React.Component<Modal.ModalProps> {
43 static Body: typeof ModalBody;
44 static Header: typeof ModalHeader;
45 static Title: typeof ModalTitle;
46 static Footer: typeof ModalFooter;
47 static Dialog: typeof ModalDialog;
48}
49export = Modal;
50
\No newline at end of file