UNPKG

react-hook-form-mantine

Version:
18 lines (17 loc) 914 B
import { UseControllerProps, FieldValues } from 'react-hook-form'; import { SwitchProps as $SwitchProps } from '@mantine/core'; import { SwitchGroup } from './SwitchGroup/SwitchGroup'; export type SwitchProps<T extends FieldValues> = UseControllerProps<T> & Omit<$SwitchProps, "value" | "checked" | "defaultValue">; export declare function Switch<T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: SwitchProps<T>): import("react").JSX.Element; export declare namespace Switch { var Item: import("@mantine/core").MantineComponent<{ props: $SwitchProps; ref: HTMLInputElement; stylesNames: import("@mantine/core").SwitchStylesNames; vars: import("@mantine/core").SwitchCssVariables; staticComponents: { Group: typeof import("@mantine/core").SwitchGroup; }; }>; var Group: typeof SwitchGroup; }