"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 generatedId = React.useId() const inputId = id || generatedId return (
{label ? ( ) : null}
{error ?

{error}

: null} {helperText && !error ? (

{helperText}

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