import './demo3.css';
import Message from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from '../..';
class App extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: true,
        };
        this.handleChange = () => {
            this.setState({
                visible: !this.state.visible,
            });
        };
        this.handleClose = () => {
            this.setState({
                visible: false,
            });
        };
    }
    render() {
        const { visible } = this.state;
        return (React.createElement("div", { className: "control-demo" },
            React.createElement(Button, { type: "primary", onClick: this.handleChange }, "Toggle Visible"),
            React.createElement(Message, { type: "warning", visible: visible, title: "Warning", closeable: true, shape: "toast", onClose: this.handleClose }, "This item already has the label \"travel\". You can add a new label.")));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('message-demo-4'));
