mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 07:26:02 +01:00
* feat(web/input): added precision prop for number input * fix(web/input): added missing disabled prop to checkbox * fix(web/input): correct icon for debug data * fix(web/input): remove step prop from typings * fix(web/debug): remove step prop
25 lines
570 B
TypeScript
25 lines
570 B
TypeScript
import { Checkbox } from '@mantine/core';
|
|
import { ICheckbox } from '../../../../typings/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}
|
|
disabled={props.row.disabled}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default CheckboxField;
|