@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: 'c568ebb15db1854f8f32ffa406f4751b16e67e4d', 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: 'af8ce6607fb53b0459673aec66d4e4453fa13f94', class: "s-notifications-item-icon" }, h("i", { key: '9a55f3c72eb6bef64f58e24395bab8f787c084ed', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: '20559c46d9087d602c83f82f409c5fa43966a8de', class: "s-notifications-item-content" }, h("div", { key: '22a21adb2253a0db5d9d404ba196fe1a2094c7ff', class: "s-notifications-item-content-leading" }, h("h4", { key: '3a07031fe0e697a4c818dece184623bd13249f30' }, this.notification.title), h("p", { key: 'a481734126292bbb2b22f4a326d7a489131a0828' }, this.notification.sub_title)), h("span", { key: 'adad90fe0b72bd92363d53c8ffcc39602da00399', class: "s-notifications-item-content-trailing" }, h("i", { key: '65401a987fd64c6647f1cabc4d802f6c835f0e61', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: '1c73bdb085cb3e5c3ecaea7352d3112b9facdf38' }, 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
}
};
}
}