#5 💄 Added Darkmode JS for dialog
This commit is contained in:
parent
5a7978fced
commit
ab4454afed
|
@ -95,6 +95,13 @@ const toggleDarkMode = () => {
|
||||||
navElement.classList.toggle("nav--dark-mode");
|
navElement.classList.toggle("nav--dark-mode");
|
||||||
submitButton.classList.toggle("submitButton--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")) {
|
if (colorModeToggleIcon.classList.contains("fa-moon")) {
|
||||||
colorModeToggleIcon.classList.remove("fa-moon");
|
colorModeToggleIcon.classList.remove("fa-moon");
|
||||||
colorModeToggleIcon.classList.add("fa-sun");
|
colorModeToggleIcon.classList.add("fa-sun");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user