Skip to main content
Version: Next

InvoiceDetailsContainer

Handles the case where the user want to get invoice details.

Usage#

import React from "react";
import {
InvoiceDetailsContainer,
InvoiceDetailsDownloadButton,
InvoiceDetailsPayButton,
Alert,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const CustomInvoiceDetailsView = () => {
return (
<InvoiceDetailsContainer
onSuccess={(userObject) => {
console.log(userObject);
}}
onFailure={(err) => {
console.error(err.message);
}}
>
<Alert />
<InvoiceDetailsDownloadButton />
<InvoiceDetailsPayButton />
</InvoiceDetailsContainer>
);
};

Reference#

InvoiceDetailsContainer#

Props#

onSuccess#

(userObject) โ‡’ void

Callback function called when the password reset request is sent succesfully.

onFailure#

(errorObject) โ‡’ void

Callback function called when the password reset request fails.

Children components#

Alert#

Displays the relevant errors or success messages.


InvoiceDetailsDownloadButton Required#

Instance of Button

A button component that downloads the invoice.


InvoiceDetailsPayButton Required#

Instance of Button

A button component that submits the invoice.

Props#

name#

string?

The title displayed inside the button