import { type InputHTMLAttributes, forwardRef } from 'react'
import { cn } from '@/lib/utils'
interface InputProps extends InputHTMLAttributes {
label?: string
error?: string
hint?: string
}
const Input = forwardRef(
({ className, label, error, hint, ...props }, ref) => (
{label && (
)}
{error &&
{error}
}
{hint && !error &&
{hint}
}
)
)
Input.displayName = 'Input'
interface TextareaProps extends React.TextareaHTMLAttributes {
label?: string
error?: string
}
const Textarea = forwardRef(
({ className, label, error, ...props }, ref) => (
{label &&
}
{error &&
{error}
}
)
)
Textarea.displayName = 'Textarea'
export { Input, Textarea }