import Radio from '..'; import React from 'react'; import ReactDOM from 'react-dom'; const RadioGroup = Radio.Group; const list = [ { value: 'apple', label: 'Apple', disabled: false, }, { value: 'pear', label: 'Pear', }, { value: 'banana', label: 'banana', }, { value: 'orange', label: 'Orange', disabled: true, }, ]; const typeList = [ { value: 'outline', label: 'outline', }, { value: 'solid', label: 'solid', }, { value: 'container', label: 'container', }, ]; const themeList = [ { value: 'white', label: 'white', }, { value: 'grey', label: 'grey', }, ]; interface PageStates { value1: string; value2: string; value3: string; type: string; theme: string; } class ControlApp extends React.Component<{}, PageStates> { constructor(props) { super(props); this.state = { value1: 'apple', value2: 'apple', value3: '', type: 'outline', theme: 'white', }; this.onNestChange = this.onNestChange.bind(this); this.onSmallChange = this.onSmallChange.bind(this); this.onMediumChange = this.onMediumChange.bind(this); } onSmallChange(value) { this.setState({ value1: value, }); } onMediumChange(value) { this.setState({ value2: value, }); } onNestChange(value) { this.setState({ value3: value, }); } handletype = type => { this.setState({ type }); }; handletheme = theme => { this.setState({ theme }); }; render() { return (

choose type

choose theme

xs size



Small size



Medium size (default)



Large size

Banana Watermelon Peach

Disabled and Selected-Disabled status

Peach Banana
); } } ReactDOM.render(, document.getElementById('radio-demo-7'));