mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 14:08:21 +00:00
* 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
23 lines
638 B
TypeScript
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;
|