From 0441c9a762df77ab0f5c08788123db7b6bc3fa9d Mon Sep 17 00:00:00 2001 From: adityanaag3 Date: Tue, 10 Aug 2021 14:24:11 +0530 Subject: [PATCH] Show color only when timer is active --- force-app/main/default/lwc/timer/timer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/lwc/timer/timer.js b/force-app/main/default/lwc/timer/timer.js index b198ab4..3e09c60 100644 --- a/force-app/main/default/lwc/timer/timer.js +++ b/force-app/main/default/lwc/timer/timer.js @@ -66,7 +66,10 @@ export default class Timer extends LightningElement { } get remainingPathColor() { - const progressPercent = this.secondsPassed / this.timeInSeconds; - return `background: ${this.getColor(progressPercent)}`; + if (!this.showStartBtn) { + const progressPercent = this.secondsPassed / this.timeInSeconds; + return `background: ${this.getColor(progressPercent)}`; + } + return ""; } }