15685: Merge branch 'master' into 15685-file-renaming-empty-name
[arvados-workbench2.git] / src / views-components / rename-file-dialog / rename-file-dialog.tsx
index 27f74b79428e0565072e0894457274443233d418..d05c110b7b3971e44e0aed7d700182e96d9b7fcb 100644 (file)
@@ -10,7 +10,7 @@ import { FormDialog } from '~/components/form-dialog/form-dialog';
 import { DialogContentText } from '@material-ui/core';
 import { TextField } from '~/components/text-field/text-field';
 import { RENAME_FILE_DIALOG, RenameFileDialogData, renameFile } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
-import { WarningIcon } from "~/components/icon/icon";
+import { WarningCollection } from '~/components/warning-collection/warning-collection';
 
 export const RenameFileDialog = compose(
     withDialog(RENAME_FILE_DIALOG),
@@ -35,10 +35,7 @@ const RenameDialogFormFields = (props: WithDialogProps<RenameFileDialogData>) =>
     <Field
         name='name'
         component={TextField}
+        autoFocus={true}
     />
-    <span style={{ display: 'flex', alignItems: 'center' }}>
-        <WarningIcon />
-        <DialogContentText style={{ paddingLeft: '8px' }}>Renaming a file will change content adress.</DialogContentText>
-    </span>
-
+    <WarningCollection text="Renaming a file will change the collection's content address." />
 </>;