2017-06-06 17:19:12 -04:00
|
|
|
import React from "react";
|
|
|
|
import ReactModal from "react-modal";
|
2017-04-01 02:51:15 -04:00
|
|
|
|
2017-06-07 21:42:19 -07:00
|
|
|
export class ModalPage extends React.PureComponent {
|
2017-05-17 04:10:25 -04:00
|
|
|
render() {
|
2017-04-01 02:51:15 -04:00
|
|
|
return (
|
2017-06-06 17:19:12 -04:00
|
|
|
<ReactModal
|
|
|
|
onCloseRequested={this.props.onAborted || this.props.onConfirmed}
|
|
|
|
{...this.props}
|
|
|
|
className={(this.props.className || "") + " modal-page"}
|
|
|
|
overlayClassName="modal-overlay"
|
|
|
|
>
|
2017-04-01 02:51:15 -04:00
|
|
|
<div className="modal-page__content">
|
|
|
|
{this.props.children}
|
|
|
|
</div>
|
|
|
|
</ReactModal>
|
|
|
|
);
|
|
|
|
}
|
2017-05-17 04:10:25 -04:00
|
|
|
}
|
2017-05-19 12:17:19 -04:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
export default ModalPage;
|