import Loading from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from '../..';
class App extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
        };
        this.onClose = () => {
            this.setState({
                visible: false,
            });
        };
    }
    onClick() {
        this.setState({ visible: !this.state.visible });
    }
    render() {
        return (React.createElement("span", null,
            React.createElement(Loading, { visible: this.state.visible, fullScreen: true, 
                // @ts-ignore
                safeNode: this.btn, onVisibleChange: this.onClose.bind(this) },
                React.createElement(Button, { onClick: this.onClick.bind(this), ref: ref => (this.btn = ref) }, "Full Screen"))));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('loading-demo-7'));
