2022-12-16 15:00:01 +01:00
|
|
|
import { Checkbox } from '@mantine/core';
|
2022-08-27 15:58:36 +02:00
|
|
|
import { useEffect } from 'react';
|
2022-10-27 14:22:15 +02:00
|
|
|
import { ICheckbox } from '../../../../interfaces/dialog';
|
2023-01-03 18:55:02 +01:00
|
|
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
2022-05-03 15:08:28 +02:00
|
|
|
|
|
|
|
|
interface Props {
|
2022-08-09 23:50:14 +02:00
|
|
|
row: ICheckbox;
|
2022-05-03 15:08:28 +02:00
|
|
|
index: number;
|
2023-01-03 18:55:02 +01:00
|
|
|
register: UseFormRegisterReturn;
|
2022-05-03 15:08:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CheckboxField: React.FC<Props> = (props) => {
|
|
|
|
|
return (
|
2023-01-03 18:55:02 +01:00
|
|
|
<Checkbox {...props.register} sx={{ display: 'flex' }} label={props.row.label} defaultChecked={props.row.checked} />
|
2022-05-03 15:08:28 +02:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default CheckboxField;
|