UNPKG

@sparklink-pro/apant

Version:

Apollo & Antd tools

49 lines 1.85 kB
import React from 'react'; import { MutationFunctionOptions } from '@apollo/client'; import { GraphQLType, TypeOperationMutation } from '../definitions'; import { useTypeMutationOptions } from '../hooks/useTypeMutation'; import { FormProps } from './Form'; export type FormTypeProps = { type: GraphQLType; name?: string; onSuccess?: ({ type, operation, result }: { type: GraphQLType; operation: TypeOperationMutation; result: any; }) => void; onFailed?: ({ type, operation, error }: { type: GraphQLType; operation: TypeOperationMutation; error: unknown; }) => void; mutationOptions?: Partial<useTypeMutationOptions>; mutateOptions?: MutationFunctionOptions; variables?: { [key: string]: any; }; formRef?: React.Ref<any>; } & Omit<FormProps, 'config'>; /** * Render a form for the given type and perform related mutation */ export declare const FormType: React.ForwardRefExoticComponent<{ type: GraphQLType; name?: string | undefined; onSuccess?: (({ type, operation, result }: { type: GraphQLType; operation: TypeOperationMutation; result: any; }) => void) | undefined; onFailed?: (({ type, operation, error }: { type: GraphQLType; operation: TypeOperationMutation; error: unknown; }) => void) | undefined; mutationOptions?: Partial<useTypeMutationOptions> | undefined; mutateOptions?: MutationFunctionOptions<any, import("@apollo/client").OperationVariables, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined; variables?: { [key: string]: any; } | undefined; formRef?: React.Ref<any> | undefined; } & Omit<FormProps, "config"> & React.RefAttributes<unknown>>; //# sourceMappingURL=FormType.d.ts.map