import Radio from '..'; import React from 'react'; import ReactDOM from 'react-dom'; import Switch from '../../switch'; interface PageStates { isPreview: boolean; checked: boolean; } class App extends React.Component<{}, PageStates> { toggleCheck: () => void; togglePreview: () => void; renderChecked: (checked: any, props: any) => JSX.Element; renderPreview: (previewed: any, props: any) => JSX.Element; constructor(props) { super(props); this.state = { isPreview: true, checked: true, }; this.togglePreview = () => { this.setState({ isPreview: !this.state.isPreview, }); }; this.toggleCheck = () => { this.setState({ checked: !this.state.checked, }); }; this.renderChecked = (checked, props) => (checked ? {props.children} : null); this.renderPreview = previewed => {previewed.label}; } render() { return ( toggle checked: toggle isPreview:{' '}

Single: Radio
Group: React Vue Angular
); } } ReactDOM.render(, document.getElementById('radio-demo-5')); // .radio-preview-inline { // display: inline-block; // margin-left: 8px; // line-height: 40px; // } // .radio-group-preview-inlline { // display: inline-block; // margin-left: 8px; // line-height: 40px; // }