UNPKG

@canard/schema-form

Version:

React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components

8 lines (7 loc) 410 B
import { type RefObject } from 'react'; import type { FormHandle } from '../components/Form'; import type { AllowedValue, InferValueType, JsonSchema } from '../types'; export declare const useFormSubmit: <Schema extends JsonSchema, Value extends AllowedValue = InferValueType<Schema>>(ref: RefObject<FormHandle<Schema, Value> | null>) => { submit: () => Promise<void>; pending: boolean | undefined; };