@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: '21d941879be8aa4e4e1d021eb35de02e0c8a7489', 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: 'd87bc5a1e76a994570e8799334a760a8bc401aab', class: "s-notifications-item-icon" }, h("i", { key: '8da261c43ece9e2c48c293c6e634498a80bdbeea', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: '62fc9b7e2b1a9e6e21caace512686e535d118e06', class: "s-notifications-item-content" }, h("div", { key: 'a0fa209eb4bb714a1c5b07ddd282c8f2c388d367', class: "s-notifications-item-content-leading" }, h("h4", { key: 'f0402b63fc4d54d9ee2321ff9fac13beb98d37d5' }, this.notification.title), h("p", { key: 'd5e92ab43d656d6f194f7e8042810e86bd1fff32' }, this.notification.sub_title)), h("span", { key: '29d44babb4ebb89265de05586f388887838c7c75', class: "s-notifications-item-content-trailing" }, h("i", { key: '7f2beafa8ee24e5ae671da82554ac8287665e003', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: 'fd434aeec4acad5b46644fdb29c31a5f28b6dccd' }, 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