import clsx from "clsx"; import styles from "./Input.module.css"; export function Input({ name, id, className, minLength, maxLength, required, defaultValue, leftAddon, icon, type, min, max, pattern, list, testId, "aria-label": ariaLabel, value, placeholder, onChange, onKeyDown, disableAutoComplete = false, readOnly, ref, }: { name?: string; id?: string; className?: string; minLength?: number; maxLength?: number; required?: boolean; defaultValue?: string; leftAddon?: string; icon?: React.ReactNode; type?: "number" | "date"; min?: number; max?: number | string; pattern?: string; list?: string; testId?: string; "aria-label"?: string; value?: string; placeholder?: string; onChange?: (e: React.ChangeEvent) => void; onKeyDown?: (e: React.KeyboardEvent) => void; disableAutoComplete?: boolean; readOnly?: boolean; ref?: React.Ref; }) { return (
{leftAddon ?
{leftAddon}
: null} {icon}
); }