react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
53 lines (51 loc) • 1.64 kB
JavaScript
import { PartiallyConstructible } from '../../utils';
import { RoundButton } from '../common/Common';
/**
Configuration of the buttons available in the action bar.
*/
export class ActionBarConfiguration extends PartiallyConstructible {
/**
Configuration of the 'flash' button.
*/
flashButton = new RoundButton({
visible: true,
backgroundColor: '?sbColorSurfaceHigh',
foregroundColor: '?sbColorOnPrimary',
activeBackgroundColor: '?sbColorWarning',
activeForegroundColor: '#1C1B1F'
});
/**
Configuration of the 'zoom' button.
*/
zoomButton = new RoundButton({
visible: true,
backgroundColor: '?sbColorSurfaceHigh',
foregroundColor: '?sbColorOnPrimary',
activeBackgroundColor: '?sbColorSurfaceHigh',
activeForegroundColor: '?sbColorOnPrimary'
});
/**
Configuration of the 'flip camera' button.
*/
flipCameraButton = new RoundButton({
visible: true,
backgroundColor: '?sbColorSurfaceHigh',
foregroundColor: '?sbColorOnPrimary',
activeBackgroundColor: '?sbColorSurfaceHigh',
activeForegroundColor: '?sbColorOnPrimary'
});
/** @param source {@displayType `DeepPartial<ActionBarConfiguration>`} */
constructor(source = {}) {
super();
if (source.flashButton !== undefined) {
this.flashButton = new RoundButton(source.flashButton);
}
if (source.zoomButton !== undefined) {
this.zoomButton = new RoundButton(source.zoomButton);
}
if (source.flipCameraButton !== undefined) {
this.flipCameraButton = new RoundButton(source.flipCameraButton);
}
}
}
//# sourceMappingURL=ActionBarConfiguration.js.map