react-hook-form-mantine
Version:
React hook form wrapper for Mantine components
22 lines (21 loc) • 1.22 kB
TypeScript
import { UseControllerProps, FieldValues } from 'react-hook-form';
import { RadioProps as $RadioProps } from '@mantine/core';
import { RadioGroup } from './RadioGroup/RadioGroup';
export type RadioProps<T extends FieldValues> = UseControllerProps<T> & Omit<$RadioProps, "value" | "defaultValue">;
/** Standalone radio input with react-hook-form controller. For use inside `RadioGroup`, use `Radio.Item` to avoid double controller registration. */
export declare function Radio<T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: RadioProps<T>): import("react").JSX.Element;
export declare namespace Radio {
var Group: typeof RadioGroup;
var Item: import("@mantine/core").MantineComponent<{
props: $RadioProps;
ref: HTMLInputElement;
stylesNames: import("@mantine/core").RadioStylesNames;
vars: import("@mantine/core").RadioCssVariables;
variant: import("@mantine/core").RadioVariant;
staticComponents: {
Group: typeof import("@mantine/core").RadioGroup;
Card: typeof import("@mantine/core").RadioCard;
Indicator: typeof import("@mantine/core").RadioIndicator;
};
}>;
}