import React from 'react' import PropTypes from 'prop-types' import {MdClose} from 'react-icons/md' import AriaModal from 'react-aria-modal' import classnames from 'classnames'; class Modal extends React.Component { static propTypes = { "data-wd-key": PropTypes.string, isOpen: PropTypes.bool.isRequired, title: PropTypes.string.isRequired, onOpenToggle: PropTypes.func.isRequired, children: PropTypes.node, underlayClickExits: PropTypes.bool, underlayProps: PropTypes.object, className: PropTypes.string, } static defaultProps = { underlayClickExits: true } // See onClose = () => { if (document.activeElement) { document.activeElement.blur(); } setImmediate(() => { this.props.onOpenToggle(false); }); } getApplicationNode() { return document.getElementById('app'); } render() { if(this.props.isOpen) { return

{this.props.title}

{this.props.children}
} else { return false; } } } export default Modal