ember-qrcode-shim

0.4.0 • Public • Published

Ember-qrcode-shim

An ember wrapper of qrcode.js, a tool to generate QR Code on client side. NPM

Installation

  • ember install ember-qrcode-shim

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

Usage

As qr-code Component

Example

{{qr-code text="http://www.example.com" colorLight="#F7F7F7" width=155 height=155 correctLevel="L"}}

Config arguments provided by qrcode.js are also provided as component attributes with same key names. They are

  • text - the target text that the QR code represents for
  • width - the QR image width
  • height - the QR image height
  • colorDark - color of dark blocks
  • colorLight - color of light background
  • correctLevel - L | M | Q | H

As ES6 module

You can also import qrcode.js as an ES6 module, so that you can have full control of rendering the QR Code as you wish.

import QRCode from 'qrcode';
...

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i ember-qrcode-shim

Weekly Downloads

4,375

Version

0.4.0

License

MIT

Unpacked Size

39.2 kB

Total Files

8

Last publish

Collaborators

  • gdong42