feat: add project.

This commit is contained in:
elforjani13
2022-07-16 04:20:17 +02:00
parent 399ba8fb8e
commit a17843ddbe
104 changed files with 2490 additions and 794 deletions

View File

@@ -0,0 +1,19 @@
import React from 'react';
import { FInputGroup } from '@/components';
import { useFormikContext } from 'formik';
export function FInputGroupComponent({ toField, ...props }) {
const { values, setFieldValue } = useFormikContext();
const { expenseQuantity, expenseUnitPrice } = values;
const total = expenseQuantity * expenseUnitPrice;
const handleBlur = () => {
setFieldValue(toField, total);
};
const inputGroupProps = {
onBlur: handleBlur,
...props,
};
return <FInputGroup {...inputGroupProps} />;
}