react-hook-form-mantine
Version:
React hook form wrapper for Mantine components
21 lines (20 loc) • 1.33 kB
TypeScript
import { FieldValues, UseControllerProps } from 'react-hook-form';
import { CheckboxProps as $CheckboxProps } from '@mantine/core';
export type CheckboxProps<T extends FieldValues> = UseControllerProps<T> & Omit<$CheckboxProps, "checked" | "defaultValue">;
/** Standalone checkbox input with react-hook-form controller. For use inside `CheckboxGroup`, use `Checkbox.Item` to avoid double controller registration. */
export declare const Checkbox: {
<T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CheckboxProps<T>): import("react").JSX.Element;
Group: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: import('..').CheckboxGroupProps<T>) => import("react").JSX.Element;
Item: import('@mantine/core').MantineComponent<{
props: $CheckboxProps;
ref: HTMLInputElement;
stylesNames: import('@mantine/core').CheckboxStylesNames;
vars: import('@mantine/core').CheckboxCssVariables;
variant: import('@mantine/core').CheckboxVariant;
staticComponents: {
Group: typeof import('@mantine/core').CheckboxGroup;
Indicator: typeof import('@mantine/core').CheckboxIndicator;
Card: typeof import('@mantine/core').CheckboxCard;
};
}>;
};