gov-gui
Version:
Gov UI Component Library Typscript Build
84 lines (83 loc) • 3.19 kB
JavaScript
import { h } from "@stencil/core";
export class LayoutComponent {
renderContent(content) {
if (typeof content === 'string') {
return h("div", { innerHTML: content });
}
else if (typeof content === 'function') {
const Component = content;
return h(Component, null);
}
return null;
}
render() {
return (h("div", { key: '737018f0172b8fefa7636b8663fb2fcc33e54673', class: "layout" }, h("div", { key: 'cd1d8a1613813936336f32c9ae91270b686715eb', class: "topbar" }, this.renderContent(this.topbar)), h("div", { key: 'fa45f7e17f1afc9829ee7450d417171f96d5709b', class: "content-wrapper" }, h("div", { key: '339327a965dd475aa2ddceecc841ca393e73aae1', class: "sidebar" }, this.renderContent(this.sidebar)), h("div", { key: 'a7295c77792e72a8a4d95c69b4cc3e5e8e0ee000', class: "content" }, h("slot", { key: 'b7794e304bba80a35fb7b99518d0325b5dcf4f9e' })))));
}
static get is() { return "gov-layout-old"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["gov-layout.css"]
};
}
static get styleUrls() {
return {
"$": ["gov-layout.css"]
};
}
static get properties() {
return {
"sidebar": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string | FunctionalComponent",
"resolved": "FunctionalComponent<{}> | string",
"references": {
"FunctionalComponent": {
"location": "import",
"path": "@stencil/core",
"id": "node_modules::FunctionalComponent"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "sidebar",
"reflect": false
},
"topbar": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string | FunctionalComponent",
"resolved": "FunctionalComponent<{}> | string",
"references": {
"FunctionalComponent": {
"location": "import",
"path": "@stencil/core",
"id": "node_modules::FunctionalComponent"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "topbar",
"reflect": false
}
};
}
}
//# sourceMappingURL=gov-layout%20copy.js.map