Deploy
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||||
|
error?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Input({ className, error, ...props }: InputProps) {
|
||||||
|
return (
|
||||||
|
<input
|
||||||
|
className={cn(
|
||||||
|
"w-full bg-white border border-[#daddd4] rounded-md px-3 py-2 text-sm text-[#2c331f] placeholder:text-[#36454F]/50 focus:outline-none focus:border-[#6b8e23] transition-colors disabled:opacity-50",
|
||||||
|
error && "border-red-500 focus:border-red-500",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
aria-invalid={error ? "true" : undefined}
|
||||||
|
aria-describedby={error ? `${props.id}-error` : undefined}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user