'use client' import { forwardRef, InputHTMLAttributes, LabelHTMLAttributes } from 'react' import { cn } from '@/utils/helpers' export interface InputProps extends InputHTMLAttributes { label?: string error?: string helperText?: string } export const Input = forwardRef( ({ className, label, error, helperText, id, ...props }, ref) => { const inputId = id || label?.toLowerCase().replace(/\s+/g, '-') return ( {label && ( {label} )} {error && ( {error} )} {helperText && !error && ( {helperText} )} ) } ) Input.displayName = 'Input' // Removed empty LabelProps interface - using LabelHTMLAttributes directly
{error}
{helperText}