This commit is contained in:
Vula Builder
2026-07-28 07:32:34 +00:00
parent 9fcd91b909
commit d01d9d5da9
+25
View File
@@ -0,0 +1,25 @@
'use client'
import { cn } from "@/lib/utils"
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
error?: string
}
export default function Input({ className, error, ...props }: InputProps) {
return (
<div className="w-full">
<input
className={cn(
"flex h-10 w-full rounded-md border border-[#e2dad4] bg-white px-3 py-2 text-sm text-[#21140d] placeholder:text-[#a89a8f] focus:outline-none focus:border-[#8b5a3c] focus:ring-1 focus:ring-[#8b5a3c]/20 disabled:cursor-not-allowed disabled:opacity-50",
error && "border-red-500 focus:border-red-500 focus:ring-red-500/20",
className
)}
{...props}
/>
{error && (
<p className="mt-1 text-sm text-red-500">{error}</p>
)}
</div>
)
}