@rozoai/deeplink-react
Version:
React component for scanning QR codes
22 lines (21 loc) • 832 B
TypeScript
import { DeeplinkData } from '@rozoai/deeplink-core';
import { IScannerProps } from '@yudiel/react-qr-scanner';
interface ScanQRProps extends Omit<IScannerProps, "onScan" | "onError"> {
/**
* Callback function invoked when a QR code is successfully scanned and parsed.
* @param {DeeplinkData} data - The parsed data from the QR code.
*/
onScan: (data: DeeplinkData) => void;
/**
* Callback function invoked when an error occurs during scanning or parsing.
* @param {Error} error - The error object.
*/
onError: (error: Error) => void;
/**
* Optional custom CSS class for the modal container.
* @type {string}
*/
className?: string;
}
export declare const ScanQr: ({ onScan, onError, ...props }: ScanQRProps) => import("react/jsx-runtime").JSX.Element;
export {};