import React, {Component, MouseEventHandler} from "react";
import './Popup.css'

type PopupProps = {
    handleClose: MouseEventHandler<HTMLSpanElement> | undefined;
}

export default class Popup extends Component<PopupProps> {
    render() {
        return <div className="popup-box" onClick={this.props.handleClose}>
            <div className="box">
                <span className="close-icon" onClick={this.props.handleClose}>x</span>
                {this.props.children}
            </div>
        </div>
    }
};

