import Input from '../../input';
import Radio from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import Switch from '../../switch';
interface PageStates {
value: number;
dir: boolean;
}
class App extends React.Component<{}, PageStates> {
onChange: (value: any, e: any) => void;
changeDir: () => void;
constructor(props) {
super(props);
this.state = {
value: 1,
dir: true,
};
this.onChange = (value, e) => {
console.log('radio checked', value, e);
this.setState({
value,
});
};
this.changeDir = () => {
this.setState({
dir: !this.state.dir,
});
};
}
render() {
const { value } = this.state;
return (
toggle direction:{' '}
Option A
Option B
Option C
More...
{value === 4 ? (
) : null}
);
}
}
ReactDOM.render(, document.getElementById('radio-demo-6'));