import NumberPicker from '..';
import Radio from '../../radio';
import React from 'react';
import ReactDOM from 'react-dom';
interface PageStates {
  device: string;
}
class Demo extends React.Component<{}, PageStates> {
  handleDeviceChange: (device: any) => void;
  constructor(props) {
    super(props);
    this.state = {
      device: 'desktop',
    };
    this.handleDeviceChange = device => {
      this.setState({
        device,
      });
    };
  }
  render() {
    return (
      <div>
        <Radio.Group
          shape="button"
          value={this.state.device}
          onChange={this.handleDeviceChange}
        >
          <Radio value="desktop">desktop</Radio>
          <Radio value="phone">phone</Radio>
        </Radio.Group>
        <hr />
        <NumberPicker
          // @ts-ignore
          device={this.state.device}
        />
      </div>
    );
  }
}
ReactDOM.render(<Demo />, document.getElementById('number-picker-demo-10'));
