Skip to content
Snippets Groups Projects

Basic form api and implement cookie entrypoint

Merged Defendi Alberto requested to merge dev into master
Files
17
 
import React, { FC } from 'react';
 
import { TextField } from '@material-ui/core';
 
 
type Props = {
 
id: string;
 
label: string;
 
error: boolean;
 
errorMessage: string;
 
value: string;
 
onChange: any;
 
};
 
 
export const InputField: FC<Props> = (props: Props) => {
 
const { id, label, error, errorMessage, onChange, value } = props;
 
return (
 
<TextField
 
variant="outlined"
 
margin="normal"
 
required
 
fullWidth
 
id={id}
 
label={label}
 
name={id}
 
onChange={onChange}
 
value={value}
 
autoComplete={id}
 
autoFocus
 
error={error}
 
helperText={error && errorMessage}
 
/>
 
);
 
};
Loading