import React from 'react'; export interface InputProps extends React.InputHTMLAttributes { label?: string; unit?: string; error?: string; helperText?: string; } export const Input: React.FC = ({ label, unit, error, helperText, id, className = '', ...props }) => { const inputId = id || (label ? label.toLowerCase().replace(/\s+/g, '-') : undefined); return (
{label && ( )}
{unit && (
{unit}
)}
{error &&

{error}

} {helperText && !error &&

{helperText}

}
); };