mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 13:22:57 +00:00
We'll be using this for our image generation roadmap: https://docs.google.com/document/d/1O9YI_iLwXkl2wAJJ23dFp3eHR-JzhlRHCBPD8psG-1E/edit The original Studio Gen 2 is in the `frontend/studio-gen-2` directory. The original Studio Gen 1 is in the `frontend/studio-gen-1` directory
24 lines
575 B
TypeScript
24 lines
575 B
TypeScript
import { FileUploader as DragDropFileUploader } from "react-drag-drop-files";
|
|
// Usage refer to https://github.com/KarimMokhtar/react-drag-drop-files
|
|
|
|
import { DragAndDropZone } from "./DragAndDropZone";
|
|
|
|
export const FileUploader = ({
|
|
file,
|
|
fileTypes,
|
|
handleChange,
|
|
}: {
|
|
file: File | undefined;
|
|
handleChange: (file: File) => void;
|
|
fileTypes: string[];
|
|
}) => (
|
|
<DragDropFileUploader
|
|
handleChange={handleChange}
|
|
name="file"
|
|
maxSize={50}
|
|
types={fileTypes}
|
|
>
|
|
<DragAndDropZone file={file} fileTypes={fileTypes} />
|
|
</DragDropFileUploader>
|
|
);
|