1.1.16 • Published 9 months ago
@pylonlending/react-elements v1.1.16
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.16
9 months ago
1.1.15
9 months ago
1.1.12
2 years ago
1.1.11
2 years ago
1.1.14
2 years ago
1.1.13
2 years ago
1.1.10
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.100
2 years ago
1.1.2
2 years ago
1.0.99
2 years ago
1.0.98
2 years ago
1.0.97
2 years ago