QR Code Scanner
Usage
import QrCodeScanner from '@sensorfactdev/qr-code-scanner';
const handleScanResult = result => {
console.log(result);
}
const MyApp = () => (
<div>
<QrCodeScanner
onQrCodeScanned={handleScanResult}
width={window.innerWidth}
height={window.innerHeight}
/>
</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