import Button from '../../button';
import Dialog from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class Demo extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
        };
        this.onOpen = () => {
            this.setState({
                visible: true,
            });
        };
        this.onClose = reason => {
            console.log(reason);
            this.setState({
                visible: false,
            });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Button, { onClick: this.onOpen, type: "primary" }, "Open dialog"),
            React.createElement(Dialog, { title: "Welcome to Alibaba.com", footer: false, visible: this.state.visible, onOk: this.onClose.bind(this, 'okClick'), onCancel: this.onClose.bind(this, 'cancelClick'), onClose: this.onClose }, "Start your business here by searching a popular product")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('dialog-demo-1'));
