removed count

This commit is contained in:
Malini 2025-12-12 11:20:40 +05:30
parent 644a3322df
commit 913fd33642

View File

@ -32,6 +32,13 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => {
} else if (value || isFocused) {
borderColor = 'border-[#92722A]';
}
// Prevent wheel event from changing the number input value
const handleWheel = (e) => {
if (type === 'number') {
e.target.blur();
}
};
return (
<div className="relative">
@ -42,6 +49,7 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => {
onChange={onChange}
onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)}
onWheel={handleWheel}
required={required}
className={`block w-full h-10 rounded-md border-2 ${borderColor} focus:ring-0 px-4 text-sm ${bgColor} transition-colors [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none`}
/>