From 75097487319932771f447f0679d01af349cf6ce3 Mon Sep 17 00:00:00 2001
From: Eugen Neuber <eugen.neuber@tugraz.at>
Date: Mon, 9 Dec 2019 16:48:44 +0100
Subject: [PATCH] Add vpu-icon to notification message

---
 packages/notification/src/vpu-notification.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/notification/src/vpu-notification.js b/packages/notification/src/vpu-notification.js
index 86131ef0..57e0fd63 100644
--- a/packages/notification/src/vpu-notification.js
+++ b/packages/notification/src/vpu-notification.js
@@ -43,13 +43,15 @@ class VPUNotification extends VPULitElement {
             const body = typeof e.detail.body !== 'undefined' ? e.detail.body : "";
             const summary = typeof e.detail.summary !== 'undefined' ? e.detail.summary : "";
             const timeout = typeof e.detail.timeout !== 'undefined' ? e.detail.timeout : 0;
+            const icon = typeof e.detail.icon !== 'undefined' ? e.detail.icon : '';
+            const iconHTML = icon !== '' ? `<vpu-icon name="${icon}"></vpu-icon>` : "";
             const summaryHTML = summary !== "" ? `<h3>${summary}</h3>` : "";
 
             that.notificationBlock.innerHTML = `
                 <div id="${notificationId}" class="notification is-${type}">
                     <button id="${notificationId}-button" onclick="parentNode.parentNode.removeChild(parentNode)" class="delete"></button>
                     ${summaryHTML}
-                    ${body}
+                    ${iconHTML} ${body}
                 </div>
             ` + that.notificationBlock.innerHTML;
 
-- 
GitLab