@kelvininc/ui-components
Version:
Kelvin UI Components
69 lines (68 loc) • 2.4 kB
JavaScript
import { Host, h } from "@stencil/core";
export class KvLoader {
constructor() {
/** (optional) If `true` the loader is enabled */
this.isLoading = false;
/** (optional) If `true` the loader is overlay */
this.hasOverlay = false;
}
render() {
return (h(Host, { key: '4f18fb1a2b9ebffd50061acc651b80f9dceb91ca' }, this.isLoading && (h("div", { key: '73a15860c750af1854ca0a94abaee615f06eb164', class: "loader-container" }, this.hasOverlay && h("div", { key: '97ab947bbe4c61b2982d2f81ebdce6860637d874', class: "overlay" }), h("div", { key: '3981c1cd8e180f086c52ffa594dd8ef9a2a411a6', class: "loader" })))));
}
static get is() { return "kv-loader"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["loader.scss"]
};
}
static get styleUrls() {
return {
"$": ["loader.css"]
};
}
static get properties() {
return {
"isLoading": {
"type": "boolean",
"attribute": "is-loading",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "(optional) If `true` the loader is enabled"
},
"getter": false,
"setter": false,
"reflect": true,
"defaultValue": "false"
},
"hasOverlay": {
"type": "boolean",
"attribute": "has-overlay",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "(optional) If `true` the loader is overlay"
},
"getter": false,
"setter": false,
"reflect": true,
"defaultValue": "false"
}
};
}
}