"use client" import * as React from "react" import { cn } from "@/lib/utils" export interface FormInputProps extends React.InputHTMLAttributes { label?: string error?: string helperText?: string } const FormInput = React.forwardRef( ({ className, type, label, error, helperText, id, ...props }, ref) => { const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}` return (
{label && ( )}
{error && (

{error}

)} {helperText && !error && (

{helperText}

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