Static Site
This commit is contained in:
151
Static/package/dist/collection/components/navbar/navbar-item.js
vendored
Normal file
151
Static/package/dist/collection/components/navbar/navbar-item.js
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
import { h } from "@stencil/core";
|
||||
export class NavbarItem {
|
||||
constructor() {
|
||||
this.isProfile = false;
|
||||
this.hideLabel = false;
|
||||
this.icon = "";
|
||||
this.href = "";
|
||||
this.target = "_self";
|
||||
this.hideComponent = false;
|
||||
}
|
||||
componentWillLoad() {
|
||||
const menuItem = this.el;
|
||||
const slotValue = menuItem.getAttribute('slot');
|
||||
if (slotValue) {
|
||||
if (slotValue.toLowerCase() === 'right-menu-profile-item') {
|
||||
this.isProfile = true;
|
||||
}
|
||||
else
|
||||
this.isProfile = false;
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (h("div", { class: `navbar__container-left-content-navigation-item ${this.hideLabel ? 'removeLabel' : ""} ${this.hideComponent ? 'hideElement' : ""}` }, h("div", { class: `navbar__container-right-content-navigation-item-icon-wrapper ${!this.icon && !this.isProfile ? "removeWrapper" : ""} ${this.isProfile ? "hide" : ""}` }, this.icon && h("ifx-icon", { icon: this.icon })), h("div", { class: `navbar__container-right-content-navigation-item-navigation-profile ${this.isProfile ? 'show' : ""}` }, h("a", { href: "javascript:void(0)" }, "AA")), h("a", { href: this.href, target: this.target }, h("slot", null))));
|
||||
}
|
||||
static get is() { return "ifx-navbar-item"; }
|
||||
static get encapsulation() { return "shadow"; }
|
||||
static get originalStyleUrls() {
|
||||
return {
|
||||
"$": ["navbar-item.scss"]
|
||||
};
|
||||
}
|
||||
static get styleUrls() {
|
||||
return {
|
||||
"$": ["navbar-item.css"]
|
||||
};
|
||||
}
|
||||
static get properties() {
|
||||
return {
|
||||
"isProfile": {
|
||||
"type": "boolean",
|
||||
"mutable": true,
|
||||
"complexType": {
|
||||
"original": "boolean",
|
||||
"resolved": "boolean",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "is-profile",
|
||||
"reflect": false,
|
||||
"defaultValue": "false"
|
||||
},
|
||||
"hideLabel": {
|
||||
"type": "boolean",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "boolean",
|
||||
"resolved": "boolean",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "hide-label",
|
||||
"reflect": false,
|
||||
"defaultValue": "false"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "string",
|
||||
"resolved": "string",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "icon",
|
||||
"reflect": false,
|
||||
"defaultValue": "\"\""
|
||||
},
|
||||
"href": {
|
||||
"type": "string",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "string",
|
||||
"resolved": "string",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "href",
|
||||
"reflect": false,
|
||||
"defaultValue": "\"\""
|
||||
},
|
||||
"target": {
|
||||
"type": "string",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "string",
|
||||
"resolved": "string",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "target",
|
||||
"reflect": false,
|
||||
"defaultValue": "\"_self\""
|
||||
},
|
||||
"hideComponent": {
|
||||
"type": "boolean",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "boolean",
|
||||
"resolved": "boolean",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "hide-component",
|
||||
"reflect": false,
|
||||
"defaultValue": "false"
|
||||
}
|
||||
};
|
||||
}
|
||||
static get elementRef() { return "el"; }
|
||||
}
|
||||
//# sourceMappingURL=navbar-item.js.map
|
Reference in New Issue
Block a user