Add new connect form, closes #7
This commit is contained in:
parent
f502fea5c1
commit
6fd5235ec9
16 changed files with 524 additions and 231 deletions
27
client/src/js/components/ui/TextInput.js
Normal file
27
client/src/js/components/ui/TextInput.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
import React from 'react';
|
||||
import { Field } from 'formik';
|
||||
|
||||
const TextInput = ({ name, placeholder, ...props }) => (
|
||||
<Field
|
||||
name={name}
|
||||
render={({ field }) => (
|
||||
<div className="textinput">
|
||||
<input
|
||||
className={field.value ? 'value' : null}
|
||||
type="text"
|
||||
name={name}
|
||||
{...field}
|
||||
{...props}
|
||||
/>
|
||||
<span className={field.value ? 'textinput-1 value' : 'textinput-1'}>
|
||||
{placeholder}
|
||||
</span>
|
||||
<span className={field.value ? 'textinput-2 value' : 'textinput-2'}>
|
||||
{placeholder}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
export default TextInput;
|
Loading…
Add table
Add a link
Reference in a new issue