Deploy
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||||
|
label?: string
|
||||||
|
error?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Input({ label, error, className, ...props }: InputProps) {
|
||||||
|
return (
|
||||||
|
<div className="w-full">
|
||||||
|
{label && (
|
||||||
|
<label className="block mb-1 text-sm font-medium text-[#1B3A1F]">{label}</label>
|
||||||
|
)}
|
||||||
|
<input
|
||||||
|
className={cn(
|
||||||
|
"w-full rounded-lg border border-[#e5e7eb] bg-white px-3 py-2 text-[#1B3A1F] placeholder:text-[#1B3A1F]/40 focus:outline-none focus:border-[#2E7D32] focus:ring-2 focus:ring-[#2E7D32]/20 transition-colors duration-200",
|
||||||
|
error && "border-red-500 focus:border-red-500 focus:ring-red-500/20",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
{error && <p className="mt-1 text-sm text-red-600">{error}</p>}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user