import * as React from "react" import { cn } from "@/lib/utils" export interface InputProps extends React.InputHTMLAttributes { label?: string error?: string hint?: string } const Input = React.forwardRef( ({ className, type, label, error, hint, id, ...props }, ref) => { const generatedId = React.useId() const inputId = id ?? generatedId return (
{label && ( )} {hint && !error && (

{hint}

)} {error && (

{error}

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