Lendica PayLater Button
PayLater button web component.
Installation
Install the PayLater button from npm
npm i @lendica/paylaterbutton
Usage
Once you have set up a module bundler to resolve ECMAScript import
, you can start by importing the component in javascript.
import '@lendica/paylaterbutton';
Then use the component as native HTML tags:
<paylater-button height="32" onclick="clickHandler()"></paylater-button>
Passing the click handler to open PayLater select-terms in app
Lendica iBranch has to be installed for the lendica API to work. Pass the clickHandler with lendica paylater function to open in-app popup.
const clickHandler = () => {
lendica.paylater.openInApp(url, onComplete)
}
Properties
Name | Type | Default |
---|---|---|
height | number | 32 |
darkMode | boolean | false |
Light mode rendered example
<paylater-button height="36" onclick="clickHandler()"></paylater-button>
Dark mode rendered example
<paylater-button height="36" darkMode="true" onclick="clickHandler()"></paylater-button>