import Box from '../../box';
import Button from '..';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
class Demo extends Component {
    constructor(props) {
        super(props);
        this.setLoading = () => {
            this.setState({ loading: true });
        };
        this.state = {
            loading: false,
        };
    }
    render() {
        return (React.createElement(Box, { direction: "row", spacing: 20 },
            React.createElement(Button, { type: "secondary", loading: true }, "Loading"),
            React.createElement(Button, { type: "primary", loading: this.state.loading, onClick: this.setLoading }, "Click to loading")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('button-demo-4'));
