1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { InjectedFormProps } from 'redux-form';
7 import { WithDialogProps } from '~/store/dialog/with-dialog';
8 import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
9 import { collectionUploaderActions, UploadFile } from "~/store/collections/uploader/collection-uploader-actions";
10 import { FormDialog } from '~/components/form-dialog/form-dialog';
11 import { CollectionNameField, CollectionDescriptionField } from '~/views-components/form-fields/collection-form-fields';
12 import { FileUpload } from '~/components/file-upload/file-upload';
14 // interface DialogCollectionDataProps {
17 // submitting: boolean;
20 // files: UploadFile[];
23 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
25 export const DialogCollectionCreate = (props: DialogCollectionProps) =>
27 dialogTitle='Create a collection'
28 formFields={CollectionAddFields}
29 submitLabel='Create a Collection'
33 const CollectionAddFields = () => <span>
34 <CollectionNameField />
35 <CollectionDescriptionField />
37 files={this.props.files}
39 onDrop={files => this.props.dispatch(collectionUploaderActions.SET_UPLOAD_FILES(files))} /> */}