react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
54 lines (47 loc) • 1.6 kB
text/typescript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/common/ScanCompletionOverlay.yaml
import { StyledText } from '../../ui_v2/common/Common';
import { DeepPartial, PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the overlay to be shown after the successful scan.
*/
export class ScanCompletionOverlay extends PartiallyConstructible {
/**
A caption below the icon.
*/
public message: StyledText = new StyledText({
text: '?completionOverlaySuccessMessage',
color: '?sbColorOnPrimary',
});
/**
Color of the icon.
Default is "?sbColorOnPrimary"
*/
public iconColor: string = '?sbColorOnPrimary';
/**
Background color of the overlay.
Default is "?sbColorSurfaceHigh"
*/
public overlayBackgroundColor: string = '?sbColorSurfaceHigh';
/**
Timeout in milliseconds after which the overlay is automatically dismissed.
Default is 1000
*/
public timeout: number = 1000;
/** @param source {@displayType `DeepPartial<ScanCompletionOverlay>`} */
public constructor(source: DeepPartial<ScanCompletionOverlay> = {}) {
super();
if (source.message !== undefined) {
this.message = new StyledText(source.message);
}
if (source.iconColor !== undefined) {
this.iconColor = source.iconColor;
}
if (source.overlayBackgroundColor !== undefined) {
this.overlayBackgroundColor = source.overlayBackgroundColor;
}
if (source.timeout !== undefined) {
this.timeout = source.timeout;
}
}
}