@salla.sa/twilight-components
Version:
Salla Web Component
36 lines (32 loc) • 2.23 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();
}
render() {
return h("a", { key: 'd1d982b64b39a019d55af0c49b5a9d9f27e7615d', href: this.notification.url, class: { "s-notifications-item": true, "s-notifications-item-shadow": true, "s-notifications-item-read": !this.notification.is_new } }, h("span", { key: 'd7f84ef1e3b01a11d99100d31be94ccb180f198f', class: "s-notifications-item-icon" }, h("i", { key: '7d4dccd4da689bdec1b15b99ed6c19f37391ccf2', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: '30f13cdfb8e09c5996705921197d1cae76475b58', class: "s-notifications-item-content" }, h("div", { key: '2eb942ca1b189bec89d4c44af0ad20fbee623177', class: "s-notifications-item-content-leading" }, h("h4", { key: '6607d79d658b299ac187497f45c40c520f8955c6' }, this.notification.title), h("p", { key: 'b361ef6671a842e50d50455e6e946b4863be3258' }, this.notification.sub_title)), h("span", { key: 'c52997e6b387eae98cb7a97886a8b1c6a8453534', class: "s-notifications-item-content-trailing" }, h("i", { key: '9da662dd0e4c6899c642185541d408573f663415', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: 'a26ab1dbf7736fc0fcfe931c295b2ea5c2889b95' }, 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;
} });
}
defineCustomElement();
export { SallaNotificationItem as S, defineCustomElement as d };