mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +01:00
10 lines
344 B
JavaScript
10 lines
344 B
JavaScript
export function NumberInput({onChange, ...props}) {
|
|
function customStringToInt(e) {
|
|
return parseInt(e, 10) || null;
|
|
}
|
|
|
|
return (
|
|
<input className="w-12 h-10 text-center rounded ring-1 ring-inset ring-black placeholder:text-gray-400" onChange={(e) => onChange(customStringToInt(e.target.value))} {...props} />
|
|
)
|
|
}
|