import clsx from "clsx"; import type { ChangeEvent, KeyboardEvent, ReactNode, RefObject } from "react"; import Label from "./Label"; import type { toolTipProperties } from "../types"; type InputElement = HTMLInputElement | HTMLTextAreaElement; interface InputProps { small?: boolean; // Will lower padding and font size. Currently only works for the default input left?: ReactNode; value: string | number | undefined; onChange: (e: ChangeEvent) => void; placeholder?: string; disabled?: boolean; type?: string; subType?: string; attributes?: { [key: string]: string | number | string[] }; // attributes specific to input type toolTipProperties?: toolTipProperties; inputRef?: RefObject; onKeyDown?: (e: KeyboardEvent) => void; } const Input = (props: InputProps) => { const isTypeTextArea = () => { return props.type === "textarea"; }; return (
{props.left && (