import * as React from "react"; import { cn } from "@/lib/utils"; 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) => { return (
{label && (
{label} {required && *}
)} 0 && "border-red-500 focus-visible:ring-red-500", className )} ref={ref} {...props} /> {helperText && (

{helperText}

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

{message}

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