import {useContext} from "react";
import {PopContext} from "../../dataCenter/Root";

function PopConfirm(props){

    const {hidePop} = useContext(PopContext)
    const {submit, title} = props

    return (
        <div className="Pop-container">
            <div className="Pop-tool">
                <button className="close" onClick={() => hidePop()}>X</button>
            </div>
            <h2 className='Pop-title'>{title}</h2>
            <div className="Pop-bottom">
                <button className='btn-submit-addToolBox' onClick={() => submit()}>确定</button>
                <button className='btn-submit-addToolBox' onClick={() => submit()}>取消</button>
            </div>
        </div>
    )
}

export default PopConfirm
