@ladg/rhfmui
Version:
The integration of MUI components with React hook form.
20 lines • 883 B
TypeScript
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
import { SwitchProps } from '@mui/material/Switch';
import { JSX } from 'react';
import { RegisterOptions, UseFormReturn } from 'react-hook-form';
type RHFMuiSwitchProps = {
rhfinstance: UseFormReturn<any>;
rhf_rules?: Omit<RegisterOptions<any, any>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
name: string;
label: string;
disabled?: boolean;
required?: boolean;
labelPlacement?: 'end' | 'bottom' | 'top' | 'start';
permanentMessage?: string | (() => JSX.Element);
onChangeExtraHandler?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
formControlLabelProps?: FormControlLabelProps;
switchProps?: SwitchProps;
};
export declare const RHFMuiSwitch: React.FC<RHFMuiSwitchProps>;
export {};
//# sourceMappingURL=RHFMuiSwitch.d.ts.map