1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { Field, WrappedFieldProps } from 'redux-form';
7 import { Grid, Input, FormControl, FormHelperText, FormLabel, InputLabel } from '@material-ui/core';
8 import { ChipsInput } from '~/components/chips-input/chips-input';
9 import { identity } from 'lodash';
10 import { PermissionSelect } from './permission-select';
13 <Grid container spacing={8}>
15 <InvitedPeopleField />
18 <PermissionSelectField />
22 const InvitedPeopleField = () =>
25 component={InvitedPeopleFieldComponent} />;
28 const InvitedPeopleFieldComponent = (props: WrappedFieldProps) =>
29 <FormControl fullWidth>
36 createNewValue={identity}
37 inputComponent={Input} />
43 const PermissionSelectField = () =>
46 component={PermissionSelectComponent} />;
48 const PermissionSelectComponent = ({ input }: WrappedFieldProps) =>
49 <FormControl fullWidth>
50 <InputLabel>Authorization</InputLabel>
51 <PermissionSelect {...input} />