import React, { Component } from "react";

class Modal extends Component 
{
	constructor(props) 
	{
		super(props);
		this.state = {
			menuOpened: false,
			activeLink: ""
		};
	}

	render() 
	{
		const { children } = this.props;

		return (
			<div className={ this.props.open ? "fade opened" : "fade" }>
				<div className="modal" style={{ maxWidth: "90vw" }}>
					{ children }
					<div className="modal_footer">
						<button className="button button-blue" onClick={() => this.props.close()}>Закрыть</button>
					</div>
				</div>
			</div>
		);
	}
}

export default Modal;
