import { forwardRef, useId } from "react"; import "./Input.css"; export const Input = forwardRef(function Input( { label, error, hint, icon = null, id, className = "", ...props }, ref ) { const generatedId = useId(); const inputId = id || generatedId; return (
{label && ( )}
{icon && {icon}}
{error ? ( {error} ) : hint ? ( {hint} ) : null}
); });