From 4034104c9e690d1b41be11c92f782ed0173fe5e7 Mon Sep 17 00:00:00 2001
From: Alexis <35.alexis.pele@gmail.com>
Date: Tue, 14 May 2024 11:21:08 +0200
Subject: [PATCH] Updated sidebar to be global
---
components/{calendar => global}/Sidebar.vue | 33 +++++++++++++++++----
components/global/SidebarProps.ts | 10 +++++++
pages/calendar.vue | 17 +++++++----
3 files changed, 49 insertions(+), 11 deletions(-)
rename components/{calendar => global}/Sidebar.vue (60%)
create mode 100644 components/global/SidebarProps.ts
diff --git a/components/calendar/Sidebar.vue b/components/global/Sidebar.vue
similarity index 60%
rename from components/calendar/Sidebar.vue
rename to components/global/Sidebar.vue
index 5320e60..cbf174f 100644
--- a/components/calendar/Sidebar.vue
+++ b/components/global/Sidebar.vue
@@ -1,9 +1,8 @@
@@ -14,6 +13,7 @@ const { revealAdvancedSearch } = useCalendar()
+
@@ -30,7 +30,28 @@ const { revealAdvancedSearch } = useCalendar()
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.tooltip }}
+
+
+
+
+
+
diff --git a/components/global/SidebarProps.ts b/components/global/SidebarProps.ts
new file mode 100644
index 0000000..fa40d08
--- /dev/null
+++ b/components/global/SidebarProps.ts
@@ -0,0 +1,10 @@
+export interface MenuItem {
+ phIcon: Component
+ tooltip: string
+ clickHandler?: () => void
+ to?: string
+}
+
+export interface SidebarProps {
+ menuItems: MenuItem[]
+}
diff --git a/pages/calendar.vue b/pages/calendar.vue
index c745ed4..0737a76 100644
--- a/pages/calendar.vue
+++ b/pages/calendar.vue
@@ -1,21 +1,28 @@
-
+