lynx-form-x
Version:
LynxFormX is a lightweight and intuitive form library built for the Lynx framework for mobile development. It streamlines form management by automatically binding fields, handling validation, and providing easy-to-use hooks for custom field manipulation—a
13 lines (12 loc) • 615 B
TypeScript
import type { ViewProps } from '@lynx-js/types';
import { ZodObject, ZodTransformer } from 'zod';
import { type FormHookValue, type OnSubmit, type ValidateFunc } from '../hooks/useForm.jsx';
type FormProps<T> = {
initialValues?: T;
onSubmit: OnSubmit<T>;
validate?: ValidateFunc<T>;
schema?: ZodObject<any> | ZodTransformer<any>;
} & Partial<ViewProps>;
export declare const formContext: import("react").Context<FormHookValue<any> | undefined>;
export declare function Form<T>({ initialValues, onSubmit, validate, schema, children, ...props }: FormProps<T>): import("react").JSX.Element;
export {};