You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
538 B
23 lines
538 B
import React from 'react'
|
|
|
|
type Props = {
|
|
onChange: (value: string, checked: boolean) => void,
|
|
num: number,
|
|
variable: number,
|
|
label: string,
|
|
value: number,
|
|
}
|
|
|
|
export const InputRadio: React.FC<Props> = ({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}
|
|
/>
|
|
)
|
|
}
|
|
|
|
|