import React from 'react';
require('./index.css')
export default class PopupComponent extends React.Component{
    constructor(props){
        super(props);
    }


    render(){
        let {popupInfo} = this.props;
        let {showPopup=false,popupChild=null} = popupInfo;
        if(!popupChild && this.props.children){
            popupChild = this.props.children;
        }
        return (
            <div className={"popupComponent " + (showPopup ? ' ' : 'hide ')}>
                {popupChild}
            </div>
        )
    }
}