import React from "react" import { useRef } from "react" import { MdFileUpload } from "react-icons/md" interface Props { onUpload?: (files: FileList)=>void } const FileUploadButton: React.FC = (props) => { const inputRef = useRef(null) return ( <> { if (inputRef.current && inputRef.current.files){ props.onUpload?.(inputRef.current.files) } }}/> ) } export default FileUploadButton