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 = () => {
            this.setState({
                visible: false,
            });
        };
    }
    render() {
        const { visible } = this.state;
        return (React.createElement("div", null,
            React.createElement(Button, { onClick: this.onOpen, type: "primary" }, "Open dialog"),
            React.createElement(Dialog, { title: "Fixed Height", visible: visible, height: "400px", onOk: this.onClose, onCancel: this.onClose, onClose: this.onClose }, "Small Content in a fixed size Dialog")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('dialog-demo-9'));
