Skip to content

Commit

Permalink
Work on the button color.
Browse files Browse the repository at this point in the history
  • Loading branch information
saakshiraut28 committed Aug 18, 2023
1 parent 9365e75 commit 55675ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/gradient-background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 55675ed

Please sign in to comment.