aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/Modal/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/Modal/index.tsx')
-rw-r--r--src/components/ui/Modal/index.tsx36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/components/ui/Modal/index.tsx b/src/components/ui/Modal/index.tsx
index 7407a686d..154beef0c 100644
--- a/src/components/ui/Modal/index.tsx
+++ b/src/components/ui/Modal/index.tsx
@@ -1,41 +1,33 @@
1import { Component, ReactChildren } from 'react'; 1import { Component, ReactNode } from 'react';
2import ReactModal from 'react-modal'; 2import ReactModal from 'react-modal';
3import classnames from 'classnames'; 3import classnames from 'classnames';
4import injectCSS from 'react-jss'; 4import injectCSS, { WithStylesProps } from 'react-jss';
5import { mdiClose } from '@mdi/js'; 5import { mdiClose } from '@mdi/js';
6 6
7import Icon from '../icon'; 7import Icon from '../icon';
8import styles from './styles'; 8import styles from './styles';
9 9
10type Props = { 10interface IProps extends WithStylesProps<typeof styles> {
11 children: ReactChildren; 11 children: ReactNode;
12 className: string;
13 classes: any;
14 isOpen: boolean; 12 isOpen: boolean;
15 portal: string;
16 close: () => void; 13 close: () => void;
17 shouldCloseOnOverlayClick: boolean; 14 className?: string | null;
18 showClose: boolean; 15 portal?: string;
19}; 16 shouldCloseOnOverlayClick?: boolean;
20 17 showClose?: boolean;
21class Modal extends Component<Props> { 18}
22 static defaultProps = {
23 className: null,
24 portal: 'modal-portal',
25 shouldCloseOnOverlayClick: false,
26 showClose: true,
27 };
28 19
20class Modal extends Component<IProps> {
29 render() { 21 render() {
30 const { 22 const {
31 children, 23 children,
32 className,
33 classes, 24 classes,
34 isOpen, 25 isOpen,
35 portal,
36 close, 26 close,
37 shouldCloseOnOverlayClick, 27 className = null,
38 showClose, 28 portal = 'modal-portal',
29 shouldCloseOnOverlayClick = false,
30 showClose = true,
39 } = this.props; 31 } = this.props;
40 32
41 return ( 33 return (