infinity-forge
Version:
28 lines (27 loc) • 1.01 kB
TypeScript
import { Dispatch, SetStateAction } from 'react';
import { ButtonProps } from '../../../../../ui/index.js';
import { FormikErrors } from 'formik';
export type ICustomSubmitProps = {
props: (stateForm: {
state: string;
message: string;
}, valuesForm: any) => ButtonProps & {
active?: boolean;
};
action: (data: any, setStateForm: Dispatch<SetStateAction<{
state: string;
message: string;
}>>, initialValues: any, handlers?: {
setFieldError: (field: string, message: string) => void;
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | FormikErrors<unknown>>;
}) => void;
active?: boolean;
};
export declare function CustomSubmitButton({ props, action, stateForm, onSubmit, active, clear, }: {
onSubmit: (action: any) => void;
stateForm: {
state: string;
message: string;
};
clear: () => void;
} & ICustomSubmitProps): import("react/jsx-runtime").JSX.Element;