import * as React from "react"; import { cn } from "@/lib/utils"; import { Eye, EyeClosed, EyeClosedIcon, EyeOffIcon } from "lucide-react"; interface InputProps extends React.InputHTMLAttributes { error?: string[]; label?: string; helperText?: string; required?: boolean; } const Input = React.forwardRef( ({ className, type, error, label, helperText, required = false, ...props }, ref) => { const [showPassword , setShowPassword] = React.useState(false) return (
{label && (
{label} {required && *}
)}
0 && "border-red-500 focus-visible:ring-red-500", className )} ref={ref} {...props} /> { type == 'password' && }
{helperText && (

{helperText}

)} {error && error.map((message, index) => (

{message}

))}
) } ) Input.displayName = "Input" export { Input }