import styles from "../../styles/pdf_gen/paramItem.module.scss"; import { ImCross } from "react-icons/im"; export default function ParamItem({ exo, unSelect, setExo, onlyNumber = false, }) { return (

{exo.name}

{!onlyNumber && ( <> { if ( (parseInt(e.target.value) <= 10 && parseInt(e.target.value) >= 1) || e.target.value == "" ) { setExo(exo.numberInExo, parseInt(e.target.value)); } else if (isNaN(parseInt(e.target.value))) { setExo(exo.numberInExo, exo.numberOfExo); } else if (parseInt(e.target.value) > 10) { setExo(exo.numberInExo, 10); } }} /> )} { if ( (parseInt(e.target.value) <= 30 && parseInt(e.target.value) >= 1) || e.target.value == "" ) { setExo(parseInt(e.target.value), exo.numberOfExo); } else if (parseInt(e.target.value) > 30) { setExo(30, exo.numberOfExo); } }} />
); }