diff options
author | 2021-09-13 14:45:46 +0200 | |
---|---|---|
committer | 2021-09-13 14:45:46 +0200 | |
commit | 537697a6e9757f118d09d9e76362ba1ff617e2c6 (patch) | |
tree | bc55447115e385137684e84697a8c15d2199b8d5 /src/components/ui/Modal | |
parent | Bumped up version to: 5.6.3-nightly.0 [skip ci] (diff) | |
download | ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.gz ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.zst ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.zip |
chore: upgrade intl dependencies (#1920)
Diffstat (limited to 'src/components/ui/Modal')
-rw-r--r-- | src/components/ui/Modal/index.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/components/ui/Modal/index.js b/src/components/ui/Modal/index.js index a9fa0cd1b..9e6830b0c 100644 --- a/src/components/ui/Modal/index.js +++ b/src/components/ui/Modal/index.js | |||
@@ -10,7 +10,8 @@ import styles from './styles'; | |||
10 | 10 | ||
11 | // ReactModal.setAppElement('#root'); | 11 | // ReactModal.setAppElement('#root'); |
12 | 12 | ||
13 | export default @injectCSS(styles) class Modal extends Component { | 13 | @injectCSS(styles) |
14 | class Modal extends Component { | ||
14 | static propTypes = { | 15 | static propTypes = { |
15 | children: PropTypes.node.isRequired, | 16 | children: PropTypes.node.isRequired, |
16 | className: PropTypes.string, | 17 | className: PropTypes.string, |
@@ -20,14 +21,14 @@ export default @injectCSS(styles) class Modal extends Component { | |||
20 | close: PropTypes.func.isRequired, | 21 | close: PropTypes.func.isRequired, |
21 | shouldCloseOnOverlayClick: PropTypes.bool, | 22 | shouldCloseOnOverlayClick: PropTypes.bool, |
22 | showClose: PropTypes.bool, | 23 | showClose: PropTypes.bool, |
23 | } | 24 | }; |
24 | 25 | ||
25 | static defaultProps = { | 26 | static defaultProps = { |
26 | className: null, | 27 | className: null, |
27 | portal: 'modal-portal', | 28 | portal: 'modal-portal', |
28 | shouldCloseOnOverlayClick: false, | 29 | shouldCloseOnOverlayClick: false, |
29 | showClose: true, | 30 | showClose: true, |
30 | } | 31 | }; |
31 | 32 | ||
32 | render() { | 33 | render() { |
33 | const { | 34 | const { |
@@ -56,18 +57,14 @@ export default @injectCSS(styles) class Modal extends Component { | |||
56 | appElement={document.getElementById('root')} | 57 | appElement={document.getElementById('root')} |
57 | > | 58 | > |
58 | {showClose && close && ( | 59 | {showClose && close && ( |
59 | <button | 60 | <button type="button" className={classes.close} onClick={close}> |
60 | type="button" | ||
61 | className={classes.close} | ||
62 | onClick={close} | ||
63 | > | ||
64 | <Icon icon={mdiClose} size={1.5} /> | 61 | <Icon icon={mdiClose} size={1.5} /> |
65 | </button> | 62 | </button> |
66 | )} | 63 | )} |
67 | <div className={classes.content}> | 64 | <div className={classes.content}>{children}</div> |
68 | {children} | ||
69 | </div> | ||
70 | </ReactModal> | 65 | </ReactModal> |
71 | ); | 66 | ); |
72 | } | 67 | } |
73 | } | 68 | } |
69 | |||
70 | export default Modal; | ||