UNPKG

react-hook-form-mantine

Version:
22 lines (21 loc) 1.14 kB
import { type UseControllerProps, type FieldValues } from "react-hook-form"; import { type 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-runtime").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: import("@mantine/core").MantineComponent<{ props: import("@mantine/core").SwitchGroupProps; ref: HTMLDivElement; stylesNames: import("@mantine/core").InputWrapperStylesNames; }>; }; }>; var Group: typeof SwitchGroup; }