The @huma-finance/widgets
package is an npm package of React components used to provide subsets of the Huma Finance Protocol functionality in a small user interface element for:
- Invoice factoring borrow and payment
- Credit line borrow and payment
- Lend supply and withdraw
- Superfluid stream borrow
Install the widgets library via npm
or yarn
.
yarn add @huma-finance/widgets
npm i --save @huma-finance/widgets
import { InvoiceFactoringBorrowWidget } from '@huma-finance/widgets'
export const InvoiceFactoringBorrowPage = () => {
return (
<InvoiceFactoringBorrowWidget
poolName='pool name'
poolType='pool type'
tokenId={tokenId}
handleClose={handleClose}
/>
)
}
For documentation on the different widgets offered please refer to the API
To see how the Huma widgets can be used, feel free to use our interactive example under src/cosmos.
- Run
yarn cosmos
- Open up
localhost:8000
in your browser and choose the fixture to test