19988: Refactor getOrder into data explorer middleware when no order prefixes are...
[arvados.git] / src / components / workflow-inputs-form / workflow-input.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 { CommandInputParameter } from 'models/workflow';
7 import { TextField } from '@material-ui/core';
8 import { required } from 'components/workflow-inputs-form/validators';
9
10 export interface WorkflowInputProps {
11     input: CommandInputParameter;
12 }
13 export const WorkflowInput = ({ input }: WorkflowInputProps) =>
14     <TextField
15         label={`${input.label || input.id}${required(input)() ? '*' : ''}`}
16         name={input.id}
17         helperText={input.doc}
18         fullWidth />;