From 6ea53dc65213f573529b8b14572e5cf1c1f5519e Mon Sep 17 00:00:00 2001 From: Benjamin Singleton <19498453+tetrogem@users.noreply.github.com> Date: Sat, 14 Jun 2025 12:38:57 -0500 Subject: [PATCH] feat: added vueuse for onClickOutside, upgraded functionality for hamburger menu and locale picker --- apps/vdn-static/package.json | 2 + apps/vdn-static/src/App.vue | 26 +++++++--- .../src/components/organisms/LocalePicker.vue | 36 ++++---------- pnpm-lock.yaml | 48 +++++++++++++++++++ 4 files changed, 80 insertions(+), 32 deletions(-) diff --git a/apps/vdn-static/package.json b/apps/vdn-static/package.json index 599813b..c8f678a 100644 --- a/apps/vdn-static/package.json +++ b/apps/vdn-static/package.json @@ -11,6 +11,8 @@ "dependencies": { "@tailwindcss/vite": "^4.1.6", "@types/node": "^22.15.17", + "@vueuse/components": "^13.3.0", + "@vueuse/core": "^13.3.0", "bulma": "^1.0.4", "tailwindcss": "^4.1.6", "vue": "^3.5.13", diff --git a/apps/vdn-static/src/App.vue b/apps/vdn-static/src/App.vue index 6fedc9b..3a5d485 100644 --- a/apps/vdn-static/src/App.vue +++ b/apps/vdn-static/src/App.vue @@ -3,16 +3,21 @@ import "./assets/style.scss"; import { ref, type Ref } from "vue"; import { SAMPLE } from "@repo/common/sample"; import LocalePicker from "./components/organisms/LocalePicker.vue"; +import { vOnClickOutside } from "@vueuse/components"; const burgerOpen: Ref = ref(false); const toggleBurger = (): void => { burgerOpen.value = !burgerOpen.value; }; + +const closeBurger = (): void => { + burgerOpen.value = false; +};