feat: apply new cards design system.

feat: empty status datatables.
fix: edit account.
This commit is contained in:
Ahmed Bouhuolia
2020-11-18 21:55:17 +02:00
parent 0b386a7cb2
commit 128feb73f8
64 changed files with 869 additions and 688 deletions

View File

@@ -0,0 +1,27 @@
import React, { useState } from 'react';
import {
Checkbox as BPCheckbox,
} from '@blueprintjs/core';
export default function CheckboxComponent(props) {
const { field, form, ...rest } = props;
const [value, setValue] = useState(field.value || false);
const handleChange = () => {
const checked = !value;
form.setFieldValue(field.name, checked);
setValue(checked);
};
const handleBlur = () => {
form.setFieldTouched(field.name);
};
const checkboxProps = {
...rest,
onChange: handleChange,
onBlur: handleBlur,
checked: value,
}
return <BPCheckbox {...checkboxProps} />;
}