Mike Phares 127634f5ab Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
Color Sorting
2024-03-13 13:15:56 -07:00

143 lines
3.4 KiB
JavaScript

// dropdown-item.tsx
import { h } from "@stencil/core";
export class DropdownItem {
constructor() {
this.icon = undefined;
this.href = "";
this.target = "_self";
this.hide = false;
this.size = 'l';
}
handleMenuSize(event) {
this.size = event.detail;
}
handleEventEmission() {
this.ifxDropdownItem.emit(this.el.textContent);
}
render() {
let hrefAttr = this.href ? { href: this.href, target: this.target } : {};
return (h("a", Object.assign({}, hrefAttr, { onClick: () => this.handleEventEmission(), class: `dropdown-item ${this.size === 's' ? 'small' : ""} ${this.hide ? 'hide' : ""}` }), this.icon && h("ifx-icon", { class: "icon", icon: this.icon }), h("span", null, h("slot", null))));
}
static get is() { return "ifx-dropdown-item"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["dropdown-item.scss"]
};
}
static get styleUrls() {
return {
"$": ["dropdown-item.css"]
};
}
static get properties() {
return {
"icon": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "icon",
"reflect": false
},
"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\""
},
"hide": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "hide",
"reflect": false,
"defaultValue": "false"
}
};
}
static get states() {
return {
"size": {}
};
}
static get events() {
return [{
"method": "ifxDropdownItem",
"name": "ifxDropdownItem",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}];
}
static get elementRef() { return "el"; }
static get listeners() {
return [{
"name": "menuSize",
"method": "handleMenuSize",
"target": "body",
"capture": false,
"passive": false
}];
}
}
//# sourceMappingURL=dropdown-item.js.map