UNPKG

@domore-hr/react-barcode-scanner

Version:

A barcode scanner base on Barcode Detector

13 lines (12 loc) 561 B
import { type FunctionComponent } from "react"; import { type ScanOptions } from "../hooks"; import { type DetectedBarcode } from "../types"; interface ScannerProps extends React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> { options?: ScanOptions; onCapture?: (barcodes: DetectedBarcode[]) => void; onCameraInitialized?: () => void; onCameraUnavailable?: () => any; trackConstraints?: MediaTrackConstraints; } declare const BarcodeScanner: FunctionComponent<ScannerProps>; export default BarcodeScanner;