UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

20 lines (19 loc) 1.15 kB
'use client'; import '@ui5/webcomponents-fiori/dist/BarcodeScannerDialog.js'; import { withWebComponent } from '../../internal/withWebComponent.js'; /** * The `BarcodeScannerDialog` component provides barcode scanning functionality for all devices that support the `MediaDevices.getUserMedia()` native API. * Opening the dialog launches the device camera and scans for known barcode formats. * * A `scanSuccess` event fires whenever a barcode is identified * and a `scanError` event fires when the scan failed (for example, due to missing permisions). * * Internally, the component uses the zxing-js/library third party OSS. * * For a list of supported barcode formats, see the [zxing-js/library](https://github.com/zxing-js/library) documentation. * * __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/) */ const BarcodeScannerDialog = withWebComponent('ui5-barcode-scanner-dialog', [], ['open'], [], ['close', 'scan-error', 'scan-success']); BarcodeScannerDialog.displayName = 'BarcodeScannerDialog'; export { BarcodeScannerDialog };