1.0.0 • Published 2 years ago

@lendica/paylaterbutton v1.0.0

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
2 years ago

Lendica PayLater Button

PayLater button web component.

npm version

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

NameTypeDefault
heightnumber32
darkModebooleanfalse

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>