@salla.sa/twilight-components
Version:
Salla Web Component
49 lines (48 loc) • 2.62 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { h } from "@stencil/core";
export class SallaNotificationItem {
render() {
return h("a", { key: '63f74fac3cc9933dd0f4808ba55852dfd7bddb62', 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: '29c5ed5f2c13e17ad27e534806e59f8c316f4543', class: "s-notifications-item-icon" }, h("i", { key: '2d3da9b6b8f06d0f9af0841bcf9fe3a6ad4ebca1', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: 'ccb51c53e1584e72eb69120b7e68322f1e1abdb3', class: "s-notifications-item-content" }, h("div", { key: '2ea640668fbd6616f7968e5585a3ae5b0d6fb17e', class: "s-notifications-item-content-leading" }, h("h4", { key: '00d91ee1b4d9aa6b3a51cb7a6dcada8c601017c5' }, this.notification.title), h("p", { key: '8ff6803d1df5128cf9d815e5645d739fcf11d975' }, this.notification.sub_title)), h("span", { key: '3f4e6b5b0bdc3e669307dc1ec6bba315e86e3fea', class: "s-notifications-item-content-trailing" }, h("i", { key: 'e2777150fad76083f8673457e4f2b90b23885974', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: '80fb3b5c1d28c4cfbd84d2354c10776ccc209883' }, 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
}
};
}
}