UNPKG

dgz-ui-shared

Version:

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

20 lines 911 B
import { type FormItemProps, type InputProps } from 'dgz-ui/form'; import type { FieldValues } from 'react-hook-form'; export type MyInputProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & InputProps; /** * MyInput is a form-aware input field that integrates with react-hook-form. * Works in both controlled (with control/name) and uncontrolled modes. * * @template TFieldValues - Form values type used by react-hook-form. * @param control * @param name * @param label * @param helperText * @param required * @param className * @param rules * @param floatingError * @param props - Input and form item props. */ export declare const MyInput: <TFieldValues extends FieldValues>({ control, name, label, helperText, required, className, rules, floatingError, ...props }: MyInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=MyInput.d.ts.map