import Checkbox from '..';
import React from 'react';
import ReactDOM from 'react-dom';

const list = [
  {
    value: 'appale',
    label: 'Appale',
  },
  {
    value: 'pear',
    label: 'Pear',
  },
  {
    value: 'orange',
    label: 'Orange',
  },
];
class ControlApp extends React.Component {
  state = {
    value: 'orange',
  };

  onChange = value => {
    this.setState({
      value,
    });
    console.log('onChange', value);
  };

  onClick = e => {
    console.log('onClick', e);
  };

  render() {
    return (
      <div>
        normal:{' '}
        <Checkbox.Group
          dataSource={list}
          value={this.state.value}
          onChange={this.onChange}
        />
        <br />
        <br />
        disabled:{' '}
        <Checkbox.Group
          disabled
          dataSource={list}
          value={this.state.value}
          onChange={this.onChange}
        />
      </div>
    );
  }
}
ReactDOM.render(<ControlApp />, document.getElementById('checkbox-demo-7'));
