import { useRef } from 'react' /** button that opens file upload window */ export function FileUploadButton(props: { onFiles: (files: File[]) => void className?: string children?: React.ReactNode }) { const { onFiles, className, children } = props const ref = useRef(null) return ( <> onFiles(Array.from(e.target.files || []))} /> ) }