@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: '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 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
}
};
}
}