Skip to main content
Version: 3.14.0

OrderConfirmModal

The order confirm modal opens after a successful ecommerce order.

Loading...
info

OrderConfirmModal will show the last order under the current user. Thus, requires the user to have at least one order.

Usage#

import React from "react";
import {
OrderConfirmModal,
PelcroModalController,
usePelcro,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const OrderConfirmExample = () => {
const { switchView } = usePelcro();
return (
<>
<button onClick={() => switchView("order-confirm")}>
Open order success
</button>
<PelcroModalController>
<OrderConfirmModal />
</PelcroModalController>
</>
);
};

Reference#

Props#

onDisplay#

() โ‡’ void

Callback function called when the modal is first displayed.

onClose#

() โ‡’ void

Callback function called when the modal is closed.