UNPKG

dgz-ui-shared

Version:

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

23 lines 971 B
import { type FormItemProps, type ReactSelectProps } from 'dgz-ui/form'; import type { FieldValues } from 'react-hook-form'; export type MySelectProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & ReactSelectProps & { onChange?: (value: unknown) => void; }; /** * MySelect wraps a ReactSelect with react-hook-form support. * Can also be used standalone when no control/name are provided. * * @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 options * @param onChange * @param props - Select and form item props. */ export declare const MySelect: <TFieldValues extends FieldValues>({ control, name, label, helperText, required, className, rules, options, onChange, ...props }: MySelectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=MySelect.d.ts.map