@microblink/blinkid-in-browser-sdk
Version:
A simple ID scanning library for WebAssembly-enabled browsers.
77 lines (76 loc) • 1.86 kB
JavaScript
/**
* Copyright (c) Microblink Ltd. All rights reserved.
*/
import { Component, Host, h, Prop } from '@stencil/core';
export class MbOverlay {
constructor() {
/**
* Set to 'false' if overlay should not cover whole screen.
*/
this.fullscreen = true;
/**
* Set to 'true' if overlay should be visible.
*/
this.visible = false;
}
render() {
return (h(Host, { className: this.getClassName() },
h("slot", null)));
}
getClassName() {
const classNames = [];
if (this.visible) {
classNames.push('visible');
}
if (!this.fullscreen) {
classNames.push('non-fullscreen');
}
return classNames.join(' ');
}
static get is() { return "mb-overlay"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["mb-overlay.scss"]
}; }
static get styleUrls() { return {
"$": ["mb-overlay.css"]
}; }
static get properties() { return {
"fullscreen": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Set to 'false' if overlay should not cover whole screen."
},
"attribute": "fullscreen",
"reflect": false,
"defaultValue": "true"
},
"visible": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Set to 'true' if overlay should be visible."
},
"attribute": "visible",
"reflect": false,
"defaultValue": "false"
}
}; }
}