@epgtechteam/faas-widget-library
v1.3.2
Published
## 1. Tech Stack
Readme
FaaS Widget Lirbary
1. Tech Stack
This library is built using:
- React (v19.x)
- TypeScript (v5.x)
- Vite (v6.x)
- CSS Modules
3. Peer Dependencies
Make sure you have the following peer dependencies installed:
{
"react": "^19.0.0",
"react-dom": "^19.0.0"
}Additionally, ensure you are using Node.js version 14 or higher.
To install the library itself, run one of the following:
npm i @epgtechteam/faas-widget-libraryor
yarn add @epgtechteam/faas-widget-library4. Getting Started
Installation
Create a new React project (if you don't have one):
npx create-react-app my-widget-app cd my-widget-appInstall the widget library:
npm i @epgtechteam/faas-widget-libraryInstall peer dependencies if needed:
npm i react react-dom
IntuitFinancing Component
The IntuitFinancing component is used to display Intuit Financing options.
Props
export type IntuitFinancingProps = {
partnerInfo: PartnerInfo;
bearerToken: string;
invitationToken: string;
env?: string;
headerInfo?: HeaderInfo;
onSuccess?: onSuccessEvent;
onError?: onErrorEvent;
onEvent?: onEvent;
};Example Usage
import React from "react";
// Import props
import type { IntuitFinancingProps } from "@epgtechteam/faas-widget-library"
// Import IntuitFinanncing Widget
import { IntuitFinancing } from "@epgtechteam/faas-widget-library";
// Import widget styles
import "@epgtechteam/faas-widget-library/styles";
function App() {
const props: IntuitFinancingProps = {
partnerInfo: {
id: "YOUR_PARTNER_ID"; // ID to identify partner
name: "PARTNER_NAME";
},
bearerToken: "YOUR_TOKEN";
invitationToken: "YOUR_TOKEN";
onSuccess?: (type: SuccessType, message: string, additionalInfo: AdditionalInfo) => console.log( "Success" );
onError?: (type: ErrorType, message: string, additionalInfo: AdditionalInfo) => console.log( "Error" );
onEvent?: (type: EventType, message: string, additionalInfo: AdditionalInfo) => console.log( "Event" );
}
return (
<>
<IntuitFinancing {...props} />
</>
);
}
export default App;