UNPKG

@commercelayer/react-components

Version:
35 lines (34 loc) 1.37 kB
import { type ReactNode, type JSX } from 'react'; import type { CustomFieldMessageError } from '../../reducers/AddressReducer'; type Props = { children: ReactNode; /** * Define if current form needs to be reset over a defined boolean condition */ reset?: boolean; /** * Define children input and select classnames assigned in case of validation error. */ errorClassName?: string; fieldEvent?: 'blur' | 'change'; /** * Callback to customize the error message for a specific field. Called for each error in the form. */ customFieldMessageError?: CustomFieldMessageError; } & Omit<JSX.IntrinsicElements['form'], 'onSubmit'>; /** * Form container for creating or editing an order related billing address or a customer address, depending on the context in use. * * <span title='Requirements' type='warning'> * Must be a child of the `<AddressesContainer>` component. * Can optionally be a child of the `<OrderContainer>` component, when it needs to be used in the checkout process and store the billing address in the order object. * </span> * <span title='Children' type='info'> * `<AddressInput>`, * `<AddressCountrySelector>`, * `<AddressStateSelector>`, * `<SaveAddressesButton>` * </span> */ export declare function BillingAddressForm(props: Props): JSX.Element; export default BillingAddressForm;