import styles from "./TextInput.module.css"; import React from "react"; import { FileUploadIcon } from "../../../Icons/FileUploadIcon"; interface InputFieldProps { label: string; value: string; width?: string; onChange?: (event: React.ChangeEvent) => void; onIconMouseDown?: ( event: React.MouseEvent, ) => void; onFocus?: React.FocusEventHandler; onBlur?: React.FocusEventHandler; children?: React.ReactNode; onKeyDown?: React.KeyboardEventHandler; inputRef?: React.Ref; fileUpload?: boolean; onFileChange?: (files: File[] | null) => void; } function PromptInput(props: Readonly) { const fileInputRef = React.useRef(null); const handleIconClick = () => { fileInputRef.current?.click(); }; const handleFileChange = (event: React.ChangeEvent) => { if (event.target.files && event.target.files.length > 0) { props.onFileChange?.(Array.from(event.target.files)); } else { props.onFileChange?.(null); } }; return (
{ <>
}
); } export default PromptInput;