import './demo2.css';
import Overlay from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from '../..';
class Demo extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
        };
        this.onClick = () => {
            this.setState({
                visible: true,
            });
        };
        this.onClose = () => {
            this.setState({
                visible: false,
            });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Button, { onClick: this.onClick, ref: ref => {
                    this.btn = ref;
                } }, "Open"),
            React.createElement(Overlay, { visible: this.state.visible, safeNode: () => this.btn, align: "cc cc", hasMask: true, disableScroll: true, onRequestClose: this.onClose },
                React.createElement("span", { className: "overlay-demo" }, "Hello World From Overlay!"))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('overlay-demo-2'));
