import * as React from 'react'; import { clsx } from 'clsx'; export interface InputProps extends React.InputHTMLAttributes { label?: string; error?: string; hint?: string; } export const Input = React.forwardRef( ({ label, error, hint, className, id, ...props }, ref) => { const inputId = id ?? (label ? `input-${label.toLowerCase().replace(/\s+/g, '-')}` : undefined); return (
{label && ( )} {error && ( )} {hint && !error && (

{hint}

)}
); } ); Input.displayName = 'Input';