---------

Code Flow of Checkbox:
  Checkbox -> Checkbox.Behaviour -> Checkbox.Skeleton

 Checkbox.Consumer

 import React from 'react';
import 'Checkbox' from './Checkbox';

const CheckboxComposer = ( props )=> {
  let [checked,setChecked] = useState(false);
  return (
    <div className="composer">
      <Checkbox label="Run All Cases"  variant={checkboxConstants.variant.outlined} color={checkboxConstants.color.primary} size={checkboxConstants.size.medium} checked={checked} onChange={()=> setChecked(!checked)}/>
      </div>
  );
};

export default CheckboxComposer;


import React from 'react';
import 'Checkbox' from './Checkbox';

export default class CheckboxComposer  extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      checked:false
    };
    
    this.handleToggleChange =
      this.handleToggleChange.bind(this);
  }

  handleToggleChange(checkedValue)
  {
    this.setState({checked:checkedValue});
  }
  render() {
    return (
    <div className="composer">
      <Checkbox label="Run All Cases" variant={checkboxConstants.variant.outlined} color={checkboxConstants.color.primary} size={checkboxConstants.size.medium} checked={this.state.checked} onChange={()=> this.handleToggleChange(!this.state.checked)}/>
      </div>
    )
  }
}

export default CheckboxConsumer; 
