import { InputHTMLAttributes, forwardRef } from 'react'; import { cn } from '../../utils'; interface InputProps extends InputHTMLAttributes { label?: string; error?: string; helperText?: string; } const Input = forwardRef( ({ className, label, error, helperText, type = 'text', ...props }, ref) => { return (
{label && ( )} {error && (

{error}

)} {helperText && !error && (

{helperText}

)}
); } ); Input.displayName = 'Input'; export { Input };