Generateurv2/frontend/components/exos/StepOptions.jsx
2022-06-24 20:02:56 +02:00

41 lines
1.2 KiB
JavaScript

import styles from "../../styles/exos/StepOptions.module.scss";
export default function StepOptions({ pageChange, serieChange }) {
return (
<div className={styles.options}>
<label htmlFor="" className="small-text">
Nombre de pages
</label>
<input
type="number"
name=""
id=""
min="1"
max="100"
/* value={page}
onChange={(e) => {
console.log(
parseInt(e.target.value, 10) == NaN
!isNaN(parseInt(e.target.value, 10)),
e.target.value,
e.target.value == ''
);
if (!isNaN(parseInt(e.target.value, 10))) {
if (parseInt(e.target.value, 10) > 100) {
setPage(100);
pageChange && pageChange(100);
} else if (parseInt(e.target.value, 10) < 1) {
setPage(1);
pageChange && pageChange(1);
} else {
setPage(e.target.value);
pageChange && pageChange(e.target.value);
}
}
}} */
/>
</div>
);
}