import './demo7.css';
import Button from '../../button';
import Icon from '../../icon';
import Progress from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class CustomProgress extends React.Component {
    constructor(props) {
        super(props);
        this.addProgress = () => {
            this.setState(prevState => {
                return {
                    percent: prevState.percent + 10,
                };
            });
        };
        this.minusProgress = () => {
            this.setState(prevState => {
                return {
                    percent: prevState.percent - 10,
                };
            });
        };
        this.state = {
            percent: 0,
        };
    }
    render() {
        const state = this.state;
        return (React.createElement("div", null,
            React.createElement("div", { className: "progress-panel" },
                React.createElement(Button.Group, null,
                    React.createElement(Button, { onClick: this.minusProgress, disabled: state.percent === 0 },
                        React.createElement(Icon, { type: "minus" })),
                    React.createElement(Button, { onClick: this.addProgress, disabled: state.percent === 100 },
                        React.createElement(Icon, { type: "add" })))),
            React.createElement(Progress, { percent: state.percent, progressive: true, size: "large" }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Progress, { percent: state.percent, progressive: true, shape: "circle", size: "large" })));
    }
}
ReactDOM.render(React.createElement(CustomProgress, null), document.getElementById('progress-demo-7'));
