1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { FileUpload } from "~/components/file-upload/file-upload";
7 import { UploadFile } from '~/store/collections/uploader/collection-uploader-actions';
8 import { Dialog, DialogTitle, DialogContent, DialogActions } from '@material-ui/core/';
9 import { Button, CircularProgress } from '@material-ui/core';
10 import { WithDialogProps } from '../../store/dialog/with-dialog';
12 export interface FilesUploadDialogProps {
16 onChange: (files: File[]) => void;
19 export const FilesUploadDialog = (props: FilesUploadDialogProps & WithDialogProps<{}>) =>
20 <Dialog open={props.open}
21 disableBackdropClick={true}
22 disableEscapeKeyDown={true}
25 <DialogTitle>Upload data</DialogTitle>
29 disabled={props.uploading}
30 onDrop={props.onChange}
37 disabled={props.uploading}
38 onClick={props.closeDialog}>
45 onClick={props.onSubmit}
46 disabled={props.uploading}>
48 ? <CircularProgress size={20} />