import React , { FC } from 'react' ; import { EuiFieldText , EuiFormRow } from '@elastic/eui' ; interface EditTransformFlyoutFormTextInputProps { dataTestSubj : string ; errorMessages : string [ ] ; helpText ? : string ; label : string ; onChange : ( value : string ) => void ; placeholder ? : string ; value : string ; } export const EditTransformFlyoutFormTextInput = ( { dataTestSubj , errorMessages , helpText , label , onChange , placeholder , value , } ) => { return ( < EuiFormRow label = { label } helpText = { helpText } isInvalid = { errorMessages . length > 0 } error = { errorMessages } > < EuiFieldText data - test - subj = { dataTestSubj } placeholder = { placeholder } isInvalid = { errorMessages . length > 0 } value = { value } onChange = { ( e ) => onChange ( e . target . value ) } aria - label = { label } /> < /EuiFormRow>); } ;