@bunnyapp/transactions-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.15 • Public • Published

Transactions Component

Description

This component is used to display a list of transactions.

Installation

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

Usage

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"}
    />
  );
};

Displaying custom transaction component

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)}
/>

Storybook documentation

Here you can view the documentation for the component. here.

Readme

Keywords

none

Package Sidebar

Install

npm i @bunnyapp/transactions-component

Weekly Downloads

0

Version

1.0.15

License

ISC

Unpacked Size

1.25 MB

Total Files

61

Last publish

Collaborators

  • bunny-service
  • bunny-rich
  • oscarluthje
  • peter1823