UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

19 lines (18 loc) 1.17 kB
'use client'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * 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! [BarcodeScannerDialog UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/fiori/BarcodeScannerDialog) | [Repository](https://github.com/UI5/webcomponents) */ const BarcodeScannerDialog = withWebComponent('ui5-barcode-scanner-dialog', [], ['open'], ['footer', 'header'], ['close', 'scan-error', 'scan-success']); BarcodeScannerDialog.displayName = 'BarcodeScannerDialog'; export { BarcodeScannerDialog };