Add colored nicks settings option
This commit is contained in:
parent
ec03db4db6
commit
6c6a9e12cf
27 changed files with 577 additions and 109 deletions
25
client/src/js/components/ui/formik/Checkbox.js
Normal file
25
client/src/js/components/ui/formik/Checkbox.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import React from 'react';
|
||||
import { Field } from 'formik';
|
||||
import Checkbox from 'components/ui/Checkbox';
|
||||
|
||||
const FormikCheckbox = ({ name, onChange, ...props }) => (
|
||||
<Field
|
||||
name={name}
|
||||
render={({ field, form }) => (
|
||||
<Checkbox
|
||||
name={name}
|
||||
checked={field.value}
|
||||
onChange={e => {
|
||||
form.setFieldTouched(name, true);
|
||||
field.onChange(e);
|
||||
if (onChange) {
|
||||
onChange(e);
|
||||
}
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
export default FormikCheckbox;
|
Loading…
Add table
Add a link
Reference in a new issue