This component is used to display a list of transactions.
npm i @bunnyapp/transactions-component
You may have to install these as well, they should be installed automatically as peer dependencies, but if not, you can install them manually.
npm i @bunnyapp/invoice-component
npm i @bunnyapp/common
import { Transactions } from "@bunnyapp/transactions-component";
const App = () => {
const isMobile = false;
return (
<Transactions
token={"your api access token"}
isMobile={isMobile}
subdomain={"https://acme.bunny.com"}
/>
);
};
The component will by default display a drawer for each transaction. If you want to display a custom component instead, you can pass a custom component to the transactionComponent
prop. If you want to do anything else when a transaction is clicked, you can pass a function to the onTransactionClick
prop.
<Transactions
token={"your api access token"}
isMobile={isMobile}
subdomain={"https://acme.bunny.com"}
transactionComponent={<CustomTransactionComponent />}
onTransactionClick={(transaction) => customOnTransactionClick(transaction)}
/>
Here you can view the documentation for the component. here.