Skip to content

Commit

Permalink
Mobile support.
Browse files Browse the repository at this point in the history
  • Loading branch information
manpreeeeeet committed Dec 14, 2024
1 parent afaea64 commit 85d997b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Theme.astro
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@
themeToggleElement?.addEventListener("mousedown", handleMouseDown);
themeToggleElement?.addEventListener("mouseup", handleMouseUp);
themeToggleElement?.addEventListener("mouseleave", handleMouseUp);

themeToggleElement?.addEventListener("touchstart", handleMouseDown);
themeToggleElement?.addEventListener("touchend", handleMouseUp);
themeToggleElement?.addEventListener("touchcancel", handleMouseUp);
</script>

0 comments on commit 85d997b

Please sign in to comment.