This commit is contained in:
Vula Builder
2026-07-25 13:58:37 +00:00
parent cfce2a0ee1
commit 5277e3dadb
+26
View File
@@ -0,0 +1,26 @@
'use client'
import { cn } from "@/lib/utils"
import React from 'react'
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string
error?: string
}
export default function Input({ label, error, className, ...props }: InputProps) {
return (
<div className="space-y-1">
{label && <label className="block text-sm font-medium text-[#210d0d]">{label}</label>}
<input
className={cn(
"w-full px-3 py-2 rounded-md border border-[#e2d4d4] bg-[#f9f4f4] text-[#210d0d] placeholder:text-[#210d0d]/50 focus:outline-none focus:border-[#dc2626] transition-colors",
error && "border-[#dc2626]",
className
)}
{...props}
/>
{error && <p className="text-sm text-[#dc2626]">{error}</p>}
</div>
)
}