import React from 'react'

type Props = {
    onChange: (value: number, checked: boolean) => void,
    num: number,
    variable: number,
    label: string,
    value: number,
    key: string,
  }

  export const InputRadio: React.FC<Props> = ({key, num, variable, onChange }) => {
    return(
        <input
            type="radio"
            name="radio"
            className='radioButton'
            value={num}
            onChange={event => onChange(event.target.value, event.target.checked)}
            checked={variable == num}
        />
    )
}

