react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
98 lines (86 loc) • 2.69 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/common/TopBarConfiguration.yaml
import { BackgroundStyle, ButtonConfiguration, ForegroundStyle, StyledText } from '../../ui_v2/common/Common';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the top bar's appearance.
*/
export class TopBarConfiguration extends PartiallyConstructible {
/**
Appearance of the top bar's title.
*/
title = new 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 ButtonConfiguration({
text: 'Cancel',
background: new BackgroundStyle({
strokeColor: '#00000000',
fillColor: '#00000000',
strokeWidth: 0.0
}),
foreground: new ForegroundStyle({
color: '?sbColorOnPrimary'
})
});
/** @param source {@displayType `DeepPartial<TopBarConfiguration>`} */
constructor(source = {}) {
super();
if (source.title !== undefined) {
this.title = new 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 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.
*/
export const StatusBarModeValues = ['DARK', 'LIGHT', 'HIDDEN'];
/**
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.
*/
export const TopBarModeValues = ['SOLID', 'GRADIENT', 'HIDDEN'];
//# sourceMappingURL=TopBarConfiguration.js.map