1.1.14 • Published 5 months ago

@pylonlending/react-elements v1.1.14

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

To install, you can add the Pylon Elements library to your project like so:

npm install @pylonlending/react-elements --save

Setting up the Loan Application component

// Import the Loan Application component
import { LoanApplicationComponent } from "@pylonlending/react-elements";

// Create a function that returns a Promise<AuthLease>, which should
// fetch the results of the auth handler you setup earlier. The response of the
// auth handler should always be JSON.
// (See https://docs.dev.braidlending.com/api-reference/handling-auth
//  for the prerequisite auth handshake work that needs to be configured
//  prior to building Pylon components into your app)
const fetchPylonAuthLease = async (): Promise<AuthLease> => {
  const response = await fetch("/auth/pylon");
  return response.json();
};

<YourApplication>
  <LoanApplicationComponent
    // Include your customer ID given to you by Pylon
    customerId="example-customer-id"
    // Include your function that returns a Promise<AuthLease>
    authLeaseCallback={fetchPylonAuthLease}
  />
</YourApplication>;

Setting up the Borrower Dashboard component

// Import the Borrower Dashboard component
import { BorrowerDashboardComponent } from "@pylonlending/react-elements";

// Create a function that returns a Promise<AuthLease>, which should
// fetch the results of the auth handler you setup earlier. The response of the
// auth handler should always be JSON.
// (See https://docs.pylonlending.com/api-reference/handling-auth
//  for the prerequisite auth handshake work that needs to be configured
//  prior to building Pylon components into your app)
const fetchPylonAuthLease = async (): Promise<AuthLease> => {
  const response = await fetch("/auth/pylon");
  return response.json();
};

<YourApplication>
  <YourApplicationHeader />
  <BorrowerDashboardComponent
    // Include your customer ID given to you by Pylon
    customerId="example-customer-id"
    // Include your function that returns a Promise<AuthLease>
    authLeaseCallback={fetchPylonAuthLease}
    // Load this loan's dashboard
    loanId="12345"
  />
</YourApplication>;
1.1.12

5 months ago

1.1.11

5 months ago

1.1.14

5 months ago

1.1.13

5 months ago

1.1.10

5 months ago

1.1.9

5 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.100

1 year ago

1.1.2

1 year ago

1.0.99

1 year ago

1.0.98

1 year ago

1.0.97

1 year ago