import {HTMLProps, VFC} from 'react';

type CheckboxProps = Omit<HTMLProps<HTMLInputElement>, 'type'> & {
  label?: string,
}

export const Checkbox: VFC<CheckboxProps> = ({
  label,
  ...etcProps
}) => {
  return (
    <div>
      <label>
        <input
          type="checkbox"
          {...etcProps}
        />
        {' '}
        <span>
          {label}
        </span>
      </label>
    </div>
  )
}
