Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[arvados-workbench2.git] / src / views / collection-panel / collection-tag-form.tsx
index 04e37f2b2ae9d78c56c682dbf818185666952aba..6d9cbd59424f4596c6406f9d7f5e724f13912d5c 100644 (file)
@@ -3,13 +3,17 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { reduxForm, reset } from 'redux-form';
-import { createCollectionTag, COLLECTION_TAG_FORM_NAME } from '~/store/collection-panel/collection-panel-action';
-import { ResourcePropertiesForm, ResourcePropertiesFormData } from '~/views-components/resource-properties-form/resource-properties-form';
+import { createCollectionTag, COLLECTION_TAG_FORM_NAME } from 'store/collection-panel/collection-panel-action';
+import { ResourcePropertiesForm, ResourcePropertiesFormData } from 'views-components/resource-properties-form/resource-properties-form';
+import { withStyles } from '@material-ui/core';
+import { Dispatch } from 'redux';
+
+const Form = withStyles(({ spacing }) => ({ container: { marginBottom: spacing.unit * 2 } }))(ResourcePropertiesForm);
 
 export const CollectionTagForm = reduxForm<ResourcePropertiesFormData>({
     form: COLLECTION_TAG_FORM_NAME,
-    onSubmit: (data, dispatch) => {
+    onSubmit: (data, dispatch: Dispatch) => {
         dispatch<any>(createCollectionTag(data));
         dispatch(reset(COLLECTION_TAG_FORM_NAME));
     }
-})(ResourcePropertiesForm);
+})(Form);