From 55675edf19b200d20c3e4f747a7ce784b9724d00 Mon Sep 17 00:00:00 2001 From: Saakshi Raut Date: Fri, 18 Aug 2023 23:19:58 +0530 Subject: [PATCH] Work on the button color. --- src/pages/gradient-background.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/gradient-background.ts b/src/pages/gradient-background.ts index 2139d7ed..4266cd34 100644 --- a/src/pages/gradient-background.ts +++ b/src/pages/gradient-background.ts @@ -35,7 +35,7 @@ const attribute = 'gradient-background'; const getNewColorButtonElement = getNewColorButton(attribute); const getRemoveColorButtonElement = getRemoveNewColorButton(attribute); - +const getResultBtn = document.getElementById('getResultBtn'); let gradientBackgroundInputs = getAllInputElements('gradient-background'); const getDegreeElement = getRange(attribute); @@ -51,9 +51,12 @@ export function gradientBackgroundGenerator( var value = element.value; // Get the value of the input field if (value.length < 3) { gradientBackgroundInputs.forEach((ele) => { + getResultBtn.style.backgroundColor = 'grey'; triggerEmptyAnimation(ele); }); return; + } else { + getResultBtn.style.backgroundColor = 'blue'; } const getOutputElement = getOutput(attribute);