mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-19 10:28:33 +00:00
25 lines
572 B
TypeScript
25 lines
572 B
TypeScript
import { Checkbox } from '@mantine/core';
|
|
import { useEffect } from 'react';
|
|
import { ICheckbox } from '../../../../interfaces/dialog';
|
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
|
|
interface Props {
|
|
row: ICheckbox;
|
|
index: number;
|
|
register: UseFormRegisterReturn;
|
|
}
|
|
|
|
const CheckboxField: React.FC<Props> = (props) => {
|
|
return (
|
|
<Checkbox
|
|
{...props.register}
|
|
sx={{ display: 'flex' }}
|
|
required={props.row.required}
|
|
label={props.row.label}
|
|
defaultChecked={props.row.checked}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default CheckboxField;
|