24 lines
567 B
JavaScript
24 lines
567 B
JavaScript
import React from "react";
|
|
import { Form, Checkbox } from "antd";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
|
const { name, label, required } = formItem;
|
|
const { t } = useTranslation();
|
|
return (
|
|
<Form.Item
|
|
name={name}
|
|
label={label}
|
|
valuePropName="checked"
|
|
rules={[
|
|
{
|
|
required: required,
|
|
message: t("general.validation.required"),
|
|
},
|
|
]}
|
|
>
|
|
<Checkbox disabled={readOnly} />
|
|
</Form.Item>
|
|
);
|
|
}
|