Add manifest.json, icons and install button, flatten client/src
This commit is contained in:
parent
a219e689c1
commit
474afda9c2
105 changed files with 338 additions and 283 deletions
27
client/js/components/ui/formik/Checkbox.js
Normal file
27
client/js/components/ui/formik/Checkbox.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
import React, { memo } from 'react';
|
||||
import { FastField } from 'formik';
|
||||
import Checkbox from 'components/ui/Checkbox';
|
||||
|
||||
const FormikCheckbox = ({ name, onChange, ...props }) => (
|
||||
<FastField
|
||||
name={name}
|
||||
render={({ field, form }) => {
|
||||
return (
|
||||
<Checkbox
|
||||
name={name}
|
||||
checked={field.value}
|
||||
onChange={e => {
|
||||
form.setFieldTouched(name, true);
|
||||
field.onChange(e);
|
||||
if (onChange) {
|
||||
onChange(e);
|
||||
}
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export default memo(FormikCheckbox);
|
8
client/js/components/ui/formik/Error.js
Normal file
8
client/js/components/ui/formik/Error.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import React from 'react';
|
||||
import { ErrorMessage } from 'formik';
|
||||
|
||||
const Error = props => (
|
||||
<ErrorMessage component="div" className="form-error" {...props} />
|
||||
);
|
||||
|
||||
export default Error;
|
0
client/js/components/ui/formik/TextInput.js
Normal file
0
client/js/components/ui/formik/TextInput.js
Normal file
Loading…
Add table
Add a link
Reference in a new issue