@salla.sa/twilight-components
Version:
Salla Web Component
50 lines (49 loc) • 2.67 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { h } from "@stencil/core";
export class SallaNotificationItem {
render() {
return h("a", { key: '1b234e649b23636170f30dfc46884e047d0f02ce', 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: '948c47868767a413bc488287af46caac7aa35c1e', class: "s-notifications-item-icon" }, h("i", { key: '2ac3ada00bd7d7f3a6d5ba85341628ac382acef5', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: 'a19c06341302bc389a2f5829c06367c03372fbfb', class: "s-notifications-item-content" }, h("div", { key: '77ed75864e91b39095ee2505e10f432fbc896ec5', class: "s-notifications-item-content-leading" }, h("h4", { key: 'cee7566266dff68eeb2d8635e1eeaf2745b1930f' }, this.notification.title), h("p", { key: '459ffde17436ff4311c64ee7f53966283390c410' }, this.notification.sub_title)), h("span", { key: 'b681d2c40f719e7d6d1e5abda8993b1bb870cbb6', class: "s-notifications-item-content-trailing" }, h("i", { key: '2cd02287aaeeeaa00f972f4e0448f66e96949525', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: '4fd57d3f80816b0e607d5e6900d7975f94cf0892' }, 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",
"attribute": "notification",
"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."
},
"getter": false,
"setter": false
}
};
}
}
//# sourceMappingURL=salla-notification-item.js.map