import Grid from '../../grid';
import Radio from '..';
import React from 'react';
import ReactDOM from 'react-dom';
const RadioGroup = Radio.Group;
const { Row, Col } = Grid;
class ControlApp extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            value: 'orange',
            other: 0,
        };
        this.onChange = this.onChange.bind(this);
    }
    onChange(value) {
        this.setState({
            value,
        });
        console.log('onChange', value);
    }
    onClick(e) {
        console.log('onClick', e);
    }
    render() {
        return (React.createElement("div", null,
            React.createElement("p", { style: { fontSize: 14 } }, "Grid Layout:"),
            React.createElement(RadioGroup, { onChange: this.onChange, style: { width: '1000px' } },
                React.createElement(Row, null,
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "apple1", onClick: this.onClick }, "Apple")),
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "pear1", onClick: this.onClick }, "Pear")),
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "banana1", onClick: this.onClick }, "Banana"))),
                React.createElement("br", null),
                React.createElement(Row, null,
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "peach", onClick: this.onClick }, "Peach")),
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "watermelon", onClick: this.onClick }, "Watermelon")),
                    React.createElement(Col, { span: "8" },
                        React.createElement(Radio, { value: "strawberry", onClick: this.onClick }, "Strawberry"))))));
    }
}
ReactDOM.render(React.createElement(ControlApp, null), document.getElementById('radio-demo-8'));
