import Radio from '..';
import React from 'react';
import ReactDOM from 'react-dom';
const RadioGroup = Radio.Group;
const sizeList = [
    {
        value: 'xl',
        label: 'xl',
    },
    {
        value: 'large',
        label: 'large',
    },
    {
        value: 'medium',
        label: 'medium',
    },
    {
        value: 'small',
        label: 'small',
    },
];
class App extends React.Component {
    constructor(props) {
        super(props);
        this.handlesize = size => {
            this.setState({ size });
        };
        this.state = {
            value: 'orange',
            size: 'medium',
        };
        this.onChange = this.onChange.bind(this);
    }
    onChange(value) {
        this.setState({
            value,
        });
    }
    render() {
        return (React.createElement("div", null,
            React.createElement("p", { style: { fontSize: 14 } }, "choose type"),
            React.createElement(Radio.Group, { defaultValue: "medium", dataSource: sizeList, value: this.state.size, onChange: this.handlesize }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(RadioGroup, { value: this.state.value, onChange: this.onChange, "aria-labelledby": "groupId" },
                React.createElement(Radio, { id: "apple", value: "apple", size: this.state.size }, "Apple"),
                React.createElement(Radio, { id: "watermelon", value: "watermelon", size: this.state.size }, "Watermelon"),
                React.createElement(Radio, { id: "orange", value: "orange", size: this.state.size }, "Orange"))));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('radio-demo-2'));
