#5 Added Darkmode JS for dialog #10
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user