UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

22 lines (21 loc) 1.04 kB
/// <reference types="react" /> import { CheckoutFormCustomer, FormFields, RequestError, RequestStatus } from '@open-tender/types'; export declare const useGuestCheckoutForm: (guest: CheckoutFormCustomer, loading: RequestStatus, error: RequestError, guestErrors: Record<string, string> | null, submit: (data: CheckoutFormCustomer) => void) => { submitRef: import("react").MutableRefObject<HTMLButtonElement | null>; inputRef: import("react").MutableRefObject<HTMLInputElement | null>; fields: FormFields; data: { company?: string | undefined; customer_id?: number | undefined; email?: string | undefined; first_name?: string | undefined; password?: string | undefined; phone?: string | undefined; last_name?: string | undefined; }; errors: Record<string, string>; disabled: boolean; submitting: boolean; handleChange: (name: string, value: string | number | boolean) => void; handleSubmit: (evt?: React.FormEvent<HTMLFormElement>) => void; };