Nocturnal Pumpkin Maelstrom

    @sensorfactdev/qr-code-scanner

    1.0.10 • Public • Published

    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

    Key Type Default Value
    onQrCodeScanned Function console.log
    width Number window.innerWidth
    height Number window.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
    

    Keywords

    none

    Install

    npm i @sensorfactdev/qr-code-scanner

    DownloadsWeekly Downloads

    0

    Version

    1.0.10

    License

    MIT

    Last publish

    Collaborators

    • jamessensorfact
    • davydkov
    • millitza
    • karimcitoh
    • bouke.krom
    • zoiderberg_nl