UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

16 lines 744 B
import { type FormItemProps, type SwitchProps } from 'dgz-ui/form'; import type { FieldValues } from 'react-hook-form'; export type MySwitchProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & SwitchProps; /** * MySwitch is a toggle switch with optional react-hook-form integration. * * @template TFieldValues - Form values type used by react-hook-form. * @param control * @param name * @param label * @param helperText * @param rules * @param props - Switch and form item props. */ export declare const MySwitch: <TFieldValues extends FieldValues>({ control, name, label, helperText, rules, ...props }: MySwitchProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=MySwitch.d.ts.map