oneaccount-js-core

1.7.13 • Public • Published

Usage

let oneaccountCore = new OneaccountCore(
  this.externalId,
  {
    level: this.level,
    color: this.color
  }
);
let qrcode = oneaccountCore.QRCode(3 * 60 * 1000);
let qrcodeDOM = toDOM(qrcode); // note, you need to implement toVDOM function (please see notes below)
document.body.appendChild(qrcodeDOM)'

Options

GlobalCSS

Returns CSS for the library (to be injected into HTML)

Data

Returns current data in the qr-code

UUID

Returns current uuid

Expires

Returns current time to expire

URL

Returns current URL

Title

Returns default title

Subtitle

Returns default subtitle

All icons:

IconCross (color: string, className: string)

IconAndroid (color: string, className: string)

IconIOS (color: string, className: string)

Logo (color: string, className: string)

LoadingLogo (color: string, className: string)

Spinner (colors: [string], className: string)

NOTE: All icons return internal object representation of svg that needs to be converted to VDOM/DOM/String or any other format you need. (please check oneaccount-react or oneaccount-angular if you need an example of how they are used)

QRCode (updateInterval: number = 1 * 60 * 1000)

Generates qr-code (updates URL, data, uuid and expires) Returns internal object representation of svg

Package Sidebar

Install

npm i oneaccount-js-core

Weekly Downloads

54

Version

1.7.13

License

MIT

Unpacked Size

29.7 kB

Total Files

3

Last publish

Collaborators

  • oilastudio