UNPKG

@jiin.seok/formkit-react

Version:

A powerful React form library with Compound Component Pattern, built-in validation, and TypeScript support

38 lines 2.59 kB
import { FieldProps, FormContextProps, FormProps, FormResetButtonProps, FormSubmitButtonProps, InputProps, LegendProps, TextareaProps, SelectProps, ComponentProps } from '../types'; import { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form'; export declare const useFormContext: () => FormContextProps; declare function Title({ children, className }: ComponentProps): import("react/jsx-runtime").JSX.Element; declare function FormResetButton({ children, className, onClick, ...rest }: FormResetButtonProps): import("react/jsx-runtime").JSX.Element; declare function FormSubmitButton({ children, variant, className, disabled, ...rest }: FormSubmitButtonProps): import("react/jsx-runtime").JSX.Element; declare function Fieldset({ children, className }: ComponentProps): import("react/jsx-runtime").JSX.Element; declare function Legend({ children, className, required }: LegendProps): import("react/jsx-runtime").JSX.Element; declare function Field({ children, className, htmlFor, isInline, hidden, }: FieldProps): import("react/jsx-runtime").JSX.Element; declare function Label({ children, className }: ComponentProps): import("react/jsx-runtime").JSX.Element; declare function Wrapper({ children, className }: ComponentProps): import("react/jsx-runtime").JSX.Element; declare function Unit({ unit }: { unit: string; }): import("react/jsx-runtime").JSX.Element; declare function ErrorMessage({ error, }: { error: FieldError | Merge<FieldErrorsImpl, any> | undefined; }): import("react/jsx-runtime").JSX.Element | null; declare function Input({ className, type, name, required, minLength, maxLength, hookFormPattern, validate, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element; declare function Textarea({ className, name, required, minLength, maxLength, validate, ...rest }: TextareaProps): import("react/jsx-runtime").JSX.Element; declare function FormSelect({ name, options, placeholder, required, className, ...rest }: SelectProps): import("react/jsx-runtime").JSX.Element; export declare const FormKit: { Root: import('react').ForwardRefExoticComponent<FormProps & import('react').RefAttributes<any>>; Title: typeof Title; ResetButton: typeof FormResetButton; SubmitButton: typeof FormSubmitButton; Fieldset: typeof Fieldset; Legend: typeof Legend; Field: typeof Field; Label: typeof Label; Wrapper: typeof Wrapper; Unit: typeof Unit; Error: typeof ErrorMessage; Input: typeof Input; Textarea: typeof Textarea; Select: typeof FormSelect; }; export default FormKit; //# sourceMappingURL=FormKit.d.ts.map