From ab4454afed5852f605b1040e1cbabf8b88571ad2 Mon Sep 17 00:00:00 2001 From: SpiritsOfMayhem Date: Wed, 13 Oct 2021 11:57:50 +0000 Subject: [PATCH] #5 :lipstick: Added Darkmode JS for dialog --- scripts.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts.js b/scripts.js index cb9dfd9..6b275cf 100644 --- a/scripts.js +++ b/scripts.js @@ -95,6 +95,13 @@ const toggleDarkMode = () => { navElement.classList.toggle("nav--dark-mode"); submitButton.classList.toggle("submitButton--dark-mode"); + /* Dialog */ + let modalContents = document.getElementsByClassName('modal-toggle') + + for (content of modalContents) { + content.classList.toggle("modal--dark-mode") + } + if (colorModeToggleIcon.classList.contains("fa-moon")) { colorModeToggleIcon.classList.remove("fa-moon"); colorModeToggleIcon.classList.add("fa-sun");