@salla.sa/twilight-components
Version:
Salla Web Component
37 lines (33 loc) • 1.74 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
const sallaNotificationsCss = "";
const SallaNotificationItem = /*@__PURE__*/ proxyCustomElement(class SallaNotificationItem extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.notification = undefined;
}
render() {
return h("a", { href: this.notification.url, class: { "s-notifications-item": true, "s-notifications-item-shadow": true, "s-notifications-item-read": !this.notification.is_new } }, h("span", { class: "s-notifications-item-icon" }, h("i", { class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { class: "s-notifications-item-content" }, h("div", { class: "s-notifications-item-content-leading" }, h("h4", null, this.notification.title), h("p", null, this.notification.sub_title)), h("span", { class: "s-notifications-item-content-trailing" }, h("i", { class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", null, this.notification.date))));
}
static get style() { return sallaNotificationsCss; }
}, [0, "salla-notification-item", {
"notification": [16]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["salla-notification-item"];
components.forEach(tagName => { switch (tagName) {
case "salla-notification-item":
if (!customElements.get(tagName)) {
customElements.define(tagName, SallaNotificationItem);
}
break;
} });
}
export { SallaNotificationItem as S, defineCustomElement as d };
//# sourceMappingURL=salla-notification-item2.js.map