From 948c9b027e7b7f9886056ecfeecb64c05f9de1c2 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 8 May 2026 21:56:36 +0200 Subject: [PATCH] refactor: use statusColor variable in template() --- index.html | 2 +- src/status-indicator.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index b9b0e77..90138ff 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@ All systems operational
- + Something's wrong
diff --git a/src/status-indicator.ts b/src/status-indicator.ts index 4886a4f..c785828 100644 --- a/src/status-indicator.ts +++ b/src/status-indicator.ts @@ -28,6 +28,8 @@ class StatusIndicator extends WebComponent { } get template(): any { + const statusColor = this.#indicatorColor[this.props.status] + return html`
@@ -47,9 +49,9 @@ class StatusIndicator extends WebComponent { this.props.pulse ? html` ` :