Deploy
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user