fixed copy parameters
[arvados.git] / 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 * as 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';
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>;