1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { isRequiredInput, StringCommandInputParameter } from '~/models/workflow';
7 import { Field } from 'redux-form';
8 import { require } from '~/validators/require';
9 import { GenericInputProps, GenericInput } from '~/views/run-process-panel/inputs/generic-input';
10 import { Input as MaterialInput } from '@material-ui/core';
12 export interface StringInputProps {
13 input: StringCommandInputParameter;
15 export const StringInput = ({ input }: StringInputProps) =>
19 component={StringInputComponent}
21 isRequiredInput(input)
26 const StringInputComponent = (props: GenericInputProps) =>
31 const Input = (props: GenericInputProps) =>
32 <MaterialInput fullWidth {...props.input} error={props.meta.touched && !!props.meta.error} />;