UNPKG

apollo-form

Version:
6 lines (5 loc) 612 B
import React from 'react'; import { FormManagerParams } from '../types'; export declare type WithFormProps<S extends object> = Omit<FormManagerParams<S>, 'apolloClient'>; declare function withForm<State extends object, Props>(params: WithFormProps<State>): (Component: React.ComponentType<Props>) => React.FunctionComponent<Props & Pick<FormManagerParams<State>, "validate" | "validationSchema" | "validateOnMount" | "initialErrors" | "initialTouches" | "name" | "manager" | "initialState" | "resetOnSubmit" | "enableReinitialize" | "onInit" | "onSubmit" | "onChange" | "formatState">>; export default withForm;