import React, { useEffect, useState } from 'react'
import { Checkbox } from 'antd'

export default props => {
  const handleChange = e => {
    props.onChange(props.menu.menuId, e.target.checked)
  }

  return <Checkbox checked={props.checked} indeterminate={props.indeterminate} onChange={handleChange}>{props.menu.name}</Checkbox>
}
