2022-05-18 10:15:54 +02:00
|
|
|
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))) {
|
2022-06-24 17:27:17 +02:00
|
|
|
|
2022-05-18 10:15:54 +02:00
|
|
|
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>
|
|
|
|
);
|
|
|
|
}
|