From f470636a70943a8ecad8bddc791a1c2dddd28e1e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 May 2019 21:13:12 +0300 Subject: Components -> UI --- vnext/src/ui/Modal.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 vnext/src/ui/Modal.js (limited to 'vnext/src/ui/Modal.js') diff --git a/vnext/src/ui/Modal.js b/vnext/src/ui/Modal.js new file mode 100644 index 00000000..799a6f35 --- /dev/null +++ b/vnext/src/ui/Modal.js @@ -0,0 +1,29 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import Icon from './Icon'; + +import './Modal.css'; + +function Modal(props) { + return props.show ? ( +
+
+
+
+ +
+
+ {props.children} +
+
+ ) : (null); +} + +export default React.memo(Modal); + +Modal.propTypes = { + onClose: PropTypes.func.isRequired, + show: PropTypes.bool, + children: PropTypes.node +}; -- cgit v1.2.3