import React, { useState, useEffect } from 'react'; export const Input: React.FC = ({type, name, label, onChange, value }) => { const RadioButton = ({...props}) => { const [variable, setVariable] = useState(0); const change = (e) => { setVariable(e.target.value); props.updateData(e.target.value); } return(
{props.masImg.map((name, num) => <> change(e) } checked={variable == num} /> )}
) } export default RadioButton;