open-index/open-npm huggingface dataset:
npm package: @huma-shan/widgets
Description: The `@humafinance/widgets` package is an [npm package](https://www.npmjs.com/package/@humafinance/widgets) of React components used to provide subsets of the Huma Finance Protocol functionality in a small user interface element for invoice factoring.
Latest version: 0.3.4

# Huma Widgets

The `@humafinance/widgets` package is an [npm package](https://www.npmjs.com/package/@humafinance/widgets) of React components used to provide subsets of the Huma Finance Protocol functionality in a small user interface element for invoice factoring.

## Installation

Install the widgets library via `npm` or `yarn`.

```js
yarn add @humafinance/widgets
```

```js
npm i --save @humafinance/widgets
```

## Invoice factoring borrow widget

```jsx
import { InvoiceFactoringBorrowWidget } from '@humafinance/widgets'

export const InvoiceFactoringOneTimePage = () => {
  return (
    <InvoiceFactoringBorrowWidget
      poolName='pool name'
      tokenId={tokenId}
      handleClose={handleClose}
    />
  )
}

export const InvoiceFactoringRecurringPage = () => {
  return (
    <InvoiceFactoringBorrowWidget
      poolName='pool name'
      tokenId={tokenId}
      shouldCallApproveForAll
      handleClose={handleClose}
    />
  )
}
```