SDKs
lehjah-react
React SDK for Lehjah embedded accounting.
The lehjah-react
is a React component that allows you to easily embed the Lehjah accounting widget into your React applications via an iframe. This component enables seamless integration with your platform by passing in necessary configuration parameters.
Installation
To install the package, use npm or yarn:
or
Usage
Here’s how to use the Lehjah
component in your React project:
Props
business_id
(required)
- Type:
string
- Description: The unique ID of the business on your platform. This is used to identify the business whose data will be displayed in the Lehjah widget.
public_key
(required)
- Type:
string
- Description: Your Lehjah developer public key. This key is required to authenticate and authorize the widget with your Lehjah account.
token
(required)
- Type:
string
- Description: The user authentication token on your platform, typically in the format of a bearer token. This token ensures that the widget displays the correct data for the authenticated user.
environment
(optional)
- Type:
'sandbox' | 'production'
- Default:
'sandbox'
- Description: Specifies the environment in which the widget will run. The default value is
'sandbox'
. Use'production'
for live environments.
width
(optional)
- Type:
string
- Default:
'100%'
- Description: The width of the iframe. Accepts any valid CSS width value.
height
(optional)
- Type:
string
- Default:
'100%'
- Description: The height of the iframe. Accepts any valid CSS height value.