LibreChat/packages/client/src/components/FileUpload.tsx
Marco Beretta 0a3e9e0468
🧹 refactor: Move Inline Styles to Classes Outside Chat and the Side Panel (#16871)
* refactor: Replace Inline Styles With Classes Outside Chat and the Side Panel

Moves display, overflow, user-select, outline, will-change, backdrop and mask styling onto utility classes and CSS custom properties across Agents, Artifacts, Audio, Bookmarks, Plugins, Projects, Share, routes and the shared client components, and drops the recorded no-inline-styles suppressions they cleared.

* test: Cover Marketplace Grid Columns Driven by the Columns Variable

* test: Pick a Single-File Directory for the Moved-File Prune Fixture
2026-10-08 12:27:15 +02:00

23 lines
638 B
TypeScript

import React, { forwardRef } from 'react';
type FileUploadProps = {
className?: string;
onClick?: () => void;
children: React.ReactNode;
handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
};
const FileUpload: React.ForwardRefExoticComponent<
FileUploadProps & React.RefAttributes<HTMLInputElement>
> = forwardRef<HTMLInputElement, FileUploadProps>(({ children, handleFileChange }, ref) => {
return (
<>
{children}
<input ref={ref} multiple type="file" className="hidden" onChange={handleFileChange} />
</>
);
});
FileUpload.displayName = 'FileUpload';
export default FileUpload;