react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
103 lines (97 loc) • 2.84 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/common/ScanbotAlertDialog.yaml
import { BackgroundStyle, ButtonConfiguration, StyledText } from '../../ui_v2/common/Common';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the standard alert dialog.
*/
export class ScanbotAlertDialog extends PartiallyConstructible {
/**
The title displayed above the message.
*/
title = new StyledText({
text: 'Title',
color: '?sbColorOnSurface'
});
/**
The explanation message.
*/
subtitle = new StyledText({
text: 'Standard explanation message text.',
color: '?sbColorOnSurfaceVariant'
});
/**
The background color of the alert dialog.
Default is "?sbColorSurface"
*/
sheetColor = '?sbColorSurface';
/**
The dialog overlay color.
Default is "?sbColorModalOverlay"
*/
modalOverlayColor = '?sbColorModalOverlay';
/**
The color of the divider line.
Default is "?sbColorOutline"
*/
dividerColor = '?sbColorOutline';
/**
Configuration of the 'OK' button.
*/
okButton = new ButtonConfiguration({
background: new BackgroundStyle({
fillColor: '?sbColorPrimary'
})
});
/**
Configuration of the middle button for dialogs with tree buttons.
*/
actionButton = new ButtonConfiguration({
visible: false,
background: new BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
})
});
/**
Configuration of the 'cancel' button.
*/
cancelButton = new ButtonConfiguration({
visible: true,
background: new BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
})
});
/** @param source {@displayType `DeepPartial<ScanbotAlertDialog>`} */
constructor(source = {}) {
super();
if (source.title !== undefined) {
this.title = new StyledText(source.title);
}
if (source.subtitle !== undefined) {
this.subtitle = new StyledText(source.subtitle);
}
if (source.sheetColor !== undefined) {
this.sheetColor = source.sheetColor;
}
if (source.modalOverlayColor !== undefined) {
this.modalOverlayColor = source.modalOverlayColor;
}
if (source.dividerColor !== undefined) {
this.dividerColor = source.dividerColor;
}
if (source.okButton !== undefined) {
this.okButton = new ButtonConfiguration(source.okButton);
}
if (source.actionButton !== undefined) {
this.actionButton = new ButtonConfiguration(source.actionButton);
}
if (source.cancelButton !== undefined) {
this.cancelButton = new ButtonConfiguration(source.cancelButton);
}
}
}
//# sourceMappingURL=ScanbotAlertDialog.js.map