@rozoai/deeplink-react-native
Version:
React Native component for scanning QR codes with Expo
56 lines • 1.61 kB
TypeScript
import { type DeeplinkData } from "@rozoai/deeplink-core";
import React from "react";
interface ScanQrNativeProps {
/**
* 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;
/**
* Controls the visibility of the scanner modal.
* @type {boolean}
* @default true
*/
isVisible?: boolean;
/**
* Callback function invoked when camera permission is denied.
* @type {() => void}
*/
onPermissionDenied?: () => void;
/**
* Optional custom styles for the container.
* @type {object}
*/
containerStyle?: object;
/**
* Optional custom styles for the scanner overlay.
* @type {object}
*/
overlayStyle?: object;
/**
* Optional text to display at the top of the scanner.
* @type {string}
* @default "Scan QR Code"
*/
headerText?: string;
/**
* Optional text to display when waiting for scan.
* @type {string}
* @default "Position QR code within the frame"
*/
instructionText?: string;
/**
* Optional text for the retry button.
* @type {string}
* @default "Scan Again"
*/
retryButtonText?: string;
}
export declare const ScanQrNative: React.FC<ScanQrNativeProps>;
export {};
//# sourceMappingURL=index.d.ts.map