From 3c1fd7b319d4a57f421083220e7ec45f97aa6ec5 Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Wed, 27 Nov 2024 15:51:55 +0100 Subject: [PATCH] Sidebar link selected --- frontend/components/SideBar.vue | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/components/SideBar.vue b/frontend/components/SideBar.vue index fa9a209..c37fe2a 100644 --- a/frontend/components/SideBar.vue +++ b/frontend/components/SideBar.vue @@ -2,14 +2,26 @@ defineProps<{ championName: String }>() +const emit = defineEmits<{ + stateChange: [state: String] +}>() + +const state = ref("runes") + +function handleStateChange(newState : string) { + state.value = newState; + emit('stateChange', newState) +} @@ -28,11 +40,14 @@ defineProps<{ margin: 5px; padding-top: 5px; padding-bottom: 5px; + border-radius: 8px; } .sidebar-link:hover { cursor: pointer; background-color: var(--color-surface-darker); - border-radius: 8px; +} +.sidebar-link-selected { + background-color: var(--color-surface); } \ No newline at end of file