This commit is contained in:
Vula Builder
2026-07-26 16:56:18 +00:00
parent 81f8626031
commit 6bd8ca5aa0
+23
View File
@@ -0,0 +1,23 @@
'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-[#d4e2d9] bg-[#f4f9f5] px-3 py-2 text-sm text-[#0d2114] placeholder:text-[#0d2114]/50 focus:border-[#16a34a] focus:outline-none focus:ring-1 focus:ring-[#16a34a] disabled:cursor-not-allowed disabled:opacity-50",
error && "border-red-500 focus:border-red-500 focus:ring-red-500",
className
)}
{...props}
/>
{error && <p className="mt-1 text-xs text-red-500">{error}</p>}
</div>
)
}