Added components for web setup

This commit is contained in:
Ildar Kamalov
2019-01-18 20:17:48 +03:00
committed by Eugene Bujak
parent 71259c5f19
commit 5349ec76fd
31 changed files with 1144 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
import React, { Fragment } from 'react';
const renderField = ({
input, className, placeholder, type, disabled, autoComplete, meta: { touched, error },
}) => (
<Fragment>
<input
{...input}
placeholder={placeholder}
type={type}
className={className}
disabled={disabled}
autoComplete={autoComplete}
/>
{!disabled && touched && (error && <span className="form__message form__message--error">{error}</span>)}
</Fragment>
);
export default renderField;