@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: 'fa482235aaa35ded7400acb211b7d0efd87ed347' }, this.isLoading && (h("div", { key: '2b697a9d1a592c2e5ab7bead1e547cb472f10da2', class: "loader-container" }, this.hasOverlay && h("div", { key: '6e3004e26df701c27450ac418ddcb20f6e042d3b', class: "overlay" }), h("div", { key: '71b2d17478b5cd6ce62dd2b90cc18297b9875e71', 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"
}
};
}
}