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 };