Skip to content

Commit 5f78476

Browse files
committed
Make it dynamic
1 parent e2eff27 commit 5f78476

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

features/admin-notifications/data.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
"runOn": "/*"
1414
}
1515
],
16+
"styles": [
17+
{
18+
"file": "style.css",
19+
"runOn": "/*"
20+
}
21+
],
1622
"tags": [],
17-
"type": ["Website"]
23+
"type": ["Website"],
24+
"dynamic": "true"
1825
}

features/admin-notifications/script.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export default async function ({ feature, console }) {
1515

1616
if (data.length > 0) {
1717
if (feature.tab.scratch === 2) {
18-
document.querySelector(".notificationsCount").style.backgroundColor =
19-
"#ff1a1a";
18+
document
19+
.querySelector(".notificationsCount")
20+
.classList.add("ste-red-alert");
2021
} else {
21-
document.querySelector(".message-count").style.backgroundColor =
22-
"#ff1a1a";
22+
document.querySelector(".message-count").classList.add("ste-red-alert");
2323
}
2424
}
2525
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.ste-red-alert {
2+
background-color: #ff1a1a !important;
3+
}

0 commit comments

Comments
 (0)