UNPKG

react-tiniest-form

Version:
15 lines (14 loc) 1.12 kB
import { ElementType, PropsWithChildren } from 'react'; import { UseFormReturn } from '../../hooks/Form/useForm'; import type { PolymorphicProps } from '../../utils/@common/polymorphic'; import type { FieldMessageProps, FieldProps, FormProps, LabelProps, PriorityMessage } from './Form.types'; import type { PropsWithRenderProps } from '../../types/@common/utility'; declare const Form: { (props: PropsWithRenderProps<FormProps, UseFormReturn>): import("react/jsx-runtime").JSX.Element; Field: <T extends "input" | "select" = "input">(props: PolymorphicProps<T, FieldProps>) => import("react/jsx-runtime").JSX.Element; Label: (props: LabelProps) => import("react/jsx-runtime").JSX.Element; FieldMessage: <T_1 extends ElementType = "div">(props: PolymorphicProps<T_1, FieldMessageProps>) => import("react/jsx-runtime").JSX.Element | null; PriorityMessage: (props: PropsWithChildren<PriorityMessage>) => import("react/jsx-runtime").JSX.Element | null; }; declare const PriorityMessage: (props: PropsWithChildren<PriorityMessage>) => import("react/jsx-runtime").JSX.Element | null; export default Form;