21224: updated selectedUuid param in details panel Arvados-DCO-1.1-Signed-off-by...
[arvados.git] / services / workbench2 / src / views-components / dialog-create / dialog-ssh-key-create.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import React from 'react';
6 import { InjectedFormProps } from 'redux-form';
7 import { WithDialogProps } from 'store/dialog/with-dialog';
8 import { FormDialog } from 'components/form-dialog/form-dialog';
9 import { SshKeyPublicField, SshKeyNameField } from 'views-components/form-fields/ssh-key-form-fields';
10 import { SshKeyCreateFormDialogData } from 'store/auth/auth-action-ssh';
11
12 type DialogSshKeyProps = WithDialogProps<{}> & InjectedFormProps<SshKeyCreateFormDialogData>;
13
14 export const DialogSshKeyCreate = (props: DialogSshKeyProps) =>
15     <FormDialog
16         dialogTitle='Add new SSH key'
17         formFields={SshKeyAddFields}
18         submitLabel='Add new ssh key'
19         {...props}
20     />;
21
22 const SshKeyAddFields = () => <span>
23     <SshKeyPublicField />
24     <SshKeyNameField />
25 </span>;