added react icons

This commit is contained in:
2021-08-20 19:24:05 +02:00
parent deed778cc7
commit adeddc7994
7 changed files with 34 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
import React from "react"
import { useRef } from "react"
import { MdFileUpload } from "react-icons/md"
interface Props {
onUpload?: (files: FileList)=>void
@@ -12,7 +13,7 @@ const FileUploadButton: React.FC<Props> = (props) => {
return (
<>
<button onClick={()=>inputRef.current?.click()} >
Upload files
<MdFileUpload size="40"/>
</button>
<input type="file" multiple className="hidden" ref={inputRef} onInput={()=>{
if (inputRef.current && inputRef.current.files){