This commit is contained in:
Vula Builder
2026-07-26 17:04:59 +00:00
parent 7ddc7f04b7
commit 0ec6b9768d
+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-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-0",
error && "border-red-500 focus:border-red-500",
className
)}
{...props}
/>
{error && <p className="mt-1 text-sm text-red-500">{error}</p>}
</div>
)
}