genie-component-library
Version:
Genie Component Library
48 lines (47 loc) • 1.13 kB
JavaScript
import { Component, h, Prop } from "@stencil/core";
/**
* @part block - Span block of the stripe
*/
export class GenieStripe {
constructor() {
/**
* Number of blocks in the stripe
*/
this.numBlocks = 5;
}
render() {
let spans = [];
for (let i = 0; i < this.numBlocks; i++) {
spans.push(h("span", { part: "block" }));
}
return (h("div", null, spans.map(span => span)));
}
static get is() { return "genie-stripe"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["genie-stripe.scss"]
}; }
static get styleUrls() { return {
"$": ["genie-stripe.css"]
}; }
static get properties() { return {
"numBlocks": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Number of blocks in the stripe"
},
"attribute": "num-blocks",
"reflect": false,
"defaultValue": "5"
}
}; }
}