import Drawer from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Radio } from '../..';
class Demo extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
            placement: 'right',
        };
        this.onOpen = () => {
            this.setState({
                visible: true,
            });
        };
        this.onClose = () => {
            this.setState({
                visible: false,
            });
        };
        this.onPlacementChange = dir => {
            this.setState({
                placement: dir,
            });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Radio.Group, { dataSource: ['right', 'bottom', 'left', 'top'], defaultValue: 'right', onChange: this.onPlacementChange }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Button, { type: "primary", onClick: this.onOpen }, " open "),
            React.createElement(Drawer, { title: "\u6807\u9898", footer: true, footerAlign: "center", visible: this.state.visible, 
                // @ts-ignore
                placement: this.state.placement, onClose: this.onClose }, "Start your business here by searching a popular product")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('drawer-demo-2'));
