Files
bodyshop/client/src/components/config-form-components/checkbox/checkbox.component.jsx
2023-06-20 09:12:36 +08:00

23 lines
522 B
JavaScript

import { Checkbox, Form } from "antd";
import React from "react";
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
const { name, label, required } = formItem;
return (
<Form.Item
name={name}
label={label}
valuePropName="checked"
rules={[
{
required: required,
//message: t("general.validation.required"),
},
]}
>
<Checkbox data-cy="checklist-item-checkbox" disabled={readOnly} />
</Form.Item>
);
}