react-native-scanbot-barcode-scanner-sdk
Version:
Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS
94 lines (88 loc) • 2.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TopBarConfiguration = void 0;
var _Common = require("../common/Common");
var _utils = require("../../utils");
/**
Configuration of the top bar's appearance.
*/
class TopBarConfiguration extends _utils.PartiallyConstructible {
/**
Appearance of the top bar's title.
*/
title = new _Common.StyledText({
visible: false,
text: 'Scan Item',
color: '?sbColorOnPrimary'
});
/**
The visual mode used for the top bar.
Default is SOLID
*/
mode = 'SOLID';
/**
The visual mode used for the status bar icons.
Default is LIGHT
*/
statusBarMode = 'LIGHT';
/**
The background color of the top bar to be used when the visual mode is specified as SOLID. Otherwise ignored.
Default is "?sbColorPrimary"
*/
backgroundColor = '?sbColorPrimary';
/**
Configuration of the 'cancel' button's appearance.
*/
cancelButton = new _Common.ButtonConfiguration({
text: 'Cancel',
background: new _Common.BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
foreground: new _Common.ForegroundStyle({
color: '?sbColorOnPrimary'
})
});
/** @param source {@displayType `DeepPartial<TopBarConfiguration>`} */
constructor(source = {}) {
super();
if (source.title !== undefined) {
this.title = new _Common.StyledText(source.title);
}
if (source.mode !== undefined) {
this.mode = source.mode;
}
if (source.statusBarMode !== undefined) {
this.statusBarMode = source.statusBarMode;
}
if (source.backgroundColor !== undefined) {
this.backgroundColor = source.backgroundColor;
}
if (source.cancelButton !== undefined) {
this.cancelButton = new _Common.ButtonConfiguration(source.cancelButton);
}
}
}
/**
The visual mode used for the status bar icons.
- `DARK`:
Display all icons in the status bar in black.
- `LIGHT`:
Display all icons in the status bar in white.
- `HIDDEN`:
Hide the status bar icons.
*/
/**
The visual mode used for the top bar.
- `SOLID`:
Display the top bar with a background color or with transparency.
- `GRADIENT`:
Display the top bar with a gradient background color or a gradient with transparency. The buttons will still be visible.
- `HIDDEN`:
Hide the top bar completely.
*/
exports.TopBarConfiguration = TopBarConfiguration;
//# sourceMappingURL=TopBarConfiguration.js.map