This commit is contained in:
Vula Builder
2026-07-14 17:42:09 +00:00
parent df332e8f61
commit 5b7f9c9af6
+22
View File
@@ -0,0 +1,22 @@
'use client'
import { cn } from "@/lib/utils"
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
error?: string
}
export default function Input({ className, error, ...props }: InputProps) {
return (
<input
className={cn(
"w-full bg-white border border-[#daddd4] rounded-md px-3 py-2 text-sm text-[#2c331f] placeholder:text-[#36454F]/50 focus:outline-none focus:border-[#6b8e23] transition-colors disabled:opacity-50",
error && "border-red-500 focus:border-red-500",
className
)}
aria-invalid={error ? "true" : undefined}
aria-describedby={error ? `${props.id}-error` : undefined}
{...props}
/>
)
}