import React from "react"; import useFormField from "../../../../Hooks/useFormField"; import { Checkbox, Form } from "antd"; import { useFormik, useFormikContext } from "formik"; import { useTranslation } from "react-i18next"; const CheckboxField = ({ name, label, isDisabled, onChange, Group, className, props, }: any) => { const formik = useFormikContext() const [t] = useTranslation() const CheckboxhandleChange = (value: any) => { console.log(value?.target?.checked); formik.setFieldValue(`QuestionOptions[${name}].isCorrect`, value?.target?.checked ? 1 : 0); }; return (
{t(`input.${label ? label : name}`)}
); }; export default CheckboxField;