UNPKG

bulmil

Version:

![bulmil](https://user-images.githubusercontent.com/2362138/65766959-c721a080-e16f-11e9-9fb9-45a5a2ad0391.jpg)

159 lines (158 loc) 4.4 kB
import { Component, Prop, h } from '@stencil/core'; export class Table { constructor() { /** * Bordered */ this.isBordered = false; /** * Striped */ this.isStriped = false; /** * Scrollable */ this.isScrollable = false; /** * Narrow */ this.isNarrow = false; /** * Hoverable */ this.isHoverable = false; /** * Fullwidth */ this.isFullwidth = false; } render() { const table = (h("table", { class: { table: true, 'is-bordered': this.isBordered, 'is-striped': this.isStriped, 'is-narrow': this.isNarrow, 'is-hoverable': this.isHoverable, 'is-fullwidth': this.isFullwidth, } }, h("slot", null))); return this.isScrollable ? h("div", { class: "table-container" }, table) : table; } static get is() { return "bm-table"; } static get originalStyleUrls() { return { "$": ["table.scss"] }; } static get styleUrls() { return { "$": ["table.css"] }; } static get properties() { return { "isBordered": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Bordered" }, "attribute": "is-bordered", "reflect": false, "defaultValue": "false" }, "isStriped": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Striped" }, "attribute": "is-striped", "reflect": false, "defaultValue": "false" }, "isScrollable": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Scrollable" }, "attribute": "is-scrollable", "reflect": false, "defaultValue": "false" }, "isNarrow": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Narrow" }, "attribute": "is-narrow", "reflect": false, "defaultValue": "false" }, "isHoverable": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Hoverable" }, "attribute": "is-hoverable", "reflect": false, "defaultValue": "false" }, "isFullwidth": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Fullwidth" }, "attribute": "is-fullwidth", "reflect": false, "defaultValue": "false" } }; } }