1.0.10 • Published 6 years ago

@sensorfactdev/qr-code-scanner v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

QR Code Scanner

Build Status Known Vulnerabilities npm version Package Quality

Usage

import QrCodeScanner from '@sensorfactdev/qr-code-scanner';

const handleScanResult = result => {
  console.log(result);
  // {
  //   "result": "RESULT STRING VALUE",
  //   "points": [
  //     {
  //       "x": 171,
  //       "y": 445,
  //       "count": 2,
  //       "estimatedModuleSize": 3.857142857142857
  //     },
  //     // .... more points
  //   ]
  // }
}

const MyApp = () => (
  <div>
    <QrCodeScanner
      onQrCodeScanned={handleScanResult}
      width={window.innerWidth}
      height={window.innerHeight}
      showAimAssist // Defaults to true, disable to remove the aim assist
    />
  </div>
)

Props

KeyTypeDefault Value
onQrCodeScannedFunctionconsole.log
widthNumberwindow.innerWidth
heightNumberwindow.innerHeight

Development

To start Storybook:

yarn start

To run the tests:

yarn test

To run tests in watch mode:

yarn test --watch

Building the module

yarn build
1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago