diff --git a/lib/component/input/file/DragAndDropFileInput.tsx b/lib/component/input/file/DragAndDropFileInput.tsx index 2ea4f5b..8aa3838 100644 --- a/lib/component/input/file/DragAndDropFileInput.tsx +++ b/lib/component/input/file/DragAndDropFileInput.tsx @@ -1,41 +1,47 @@ +import { DangerButton } from "$/component/button"; import type { FileInputProps } from "$/types/InputTypes"; import { humanReadableBytes } from "$/util/FileUtil"; import clsx from "clsx"; -import { useEffect, useRef, useState } from "react"; +import { useRef, useState } from "react"; +import { MdClose } from "react-icons/md"; export default function DragAndDropFileInput({ id, className, name, + ariaLabel, minSize, maxSize, - showFileName, - showSize, + showFileName = true, + showSize = true, onChange, disabled, children -}: FileInputProps){ +}: Readonly){ const [ file, setFile ] = useState(); const inputRef = useRef(null); - useEffect(() => { - onChange?.(file); - }, [ file, onChange ]); - return (