@salla.sa/twilight-components
Version:
Salla Web Component
50 lines (49 loc) • 1.88 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { h } from "@stencil/core";
export class SallaNotificationItem {
constructor() {
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 is() { return "salla-notification-item"; }
static get originalStyleUrls() {
return {
"$": ["salla-notifications.scss"]
};
}
static get styleUrls() {
return {
"$": ["salla-notifications.css"]
};
}
static get properties() {
return {
"notification": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "Notification",
"resolved": "Notification",
"references": {
"Notification": {
"location": "import",
"path": "./interfaces",
"id": "src/components/salla-notifications/interfaces.ts::Notification"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Notification instance to render."
}
}
};
}
}
//# sourceMappingURL=salla-notification-item.js.map