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

const list = [
  {
    value: 'apple',
    label: 'Apple',
    disabled: false,
  },
  {
    value: 'pear',
    label: 'Pear',
  },
  {
    value: 'orange',
    label: 'Orange',
    disabled: true,
  },
];

class App extends React.Component {
  state = {
    value: 'apple',
  };

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

  render() {
    return (
      <Checkbox.Group
        dataSource={list}
        value={this.state.value}
        onChange={this.onChange}
      />
    );
  }
}

ReactDOM.render(<App />, document.getElementById('checkbox-demo-6'));
