Merge branch 'master' into 14183-layout-can-be-altered-when-accessing-creating-a...
[arvados-workbench2.git] / src / views-components / form-fields / project-form-fields.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 { Field } from "redux-form";
7 import { TextField } from "~/components/text-field/text-field";
8 import { PROJECT_NAME_VALIDATION, PROJECT_DESCRIPTION_VALIDATION } from "~/validators/validators";
9
10 export const ProjectNameField = () =>
11     <Field
12         name='name'
13         component={TextField}
14         validate={PROJECT_NAME_VALIDATION}
15         label="Project Name" />;
16
17 export const ProjectDescriptionField = () =>
18     <Field
19         name='description'
20         component={TextField}
21         validate={PROJECT_DESCRIPTION_VALIDATION}
22         label="Description - optional" />;