import Balloon from '..';
import Button from '../../button';
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            visible: false,
        };
    }
    // triggered every time visible becomes false
    onClose() {
        console.log('onClose doing!');
    }
    onClick() {
        this.setState({ visible: true });
    }
    render() {
        const visibleTrigger = (React.createElement(Button, { onClick: this.onClick.bind(this), type: "primary" }, "click to pupup the card"));
        const content = React.createElement("div", null, "content");
        return (React.createElement("div", null,
            React.createElement(Balloon, { trigger: visibleTrigger, triggerType: "click", closable: false, visible: this.state.visible, onClose: this.onClose.bind(this) }, content)));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('balloon-demo-9'));
