Update ToggleMenu icon and animation on open

This commit is contained in:
prototypa
2023-09-02 18:53:41 -04:00
parent 36f400e667
commit 45953647bb
2 changed files with 23 additions and 10 deletions

View File

@ -45,7 +45,8 @@ import { UI } from '~/utils/config';
document.querySelector("#header > div > div:last-child")?.classList.add("hidden");
});
attachEvent('[data-aw-toggle-menu]', 'click', function () {
attachEvent('[data-aw-toggle-menu]', 'click', function (_, elem) {
elem.classList.toggle("expanded");
document.body.classList.toggle("overflow-hidden");
document.getElementById("header")?.classList.toggle("h-screen");
document.getElementById("header")?.classList.toggle("expanded");