Feat(sidebar): allow left sidebar layout content to toggle the sidebar #159

Merged
jakob.scheid merged 3 commits from feature/left-sidebar-layout-content-sidebar-toggling into main 2026-08-03 17:29:23 +02:00
Showing only changes of commit a77bbec3fa - Show all commits
+3 -3
View File
@@ -29,7 +29,7 @@ const props = defineProps({
const expanded = ref(props.expanded); const expanded = ref(props.expanded);
const toggleExpanded = function toggleExpanded () { const toggleSidebar = function toggleSidebar () {
expanded.value = !expanded.value; expanded.value = !expanded.value;
}; };
</script> </script>
@@ -37,9 +37,9 @@ const toggleExpanded = function toggleExpanded () {
<template> <template>
<div class="layout-container" :class="{ expanded }"> <div class="layout-container" :class="{ expanded }">
<div class="sidebar-expand-button-container"> <div class="sidebar-expand-button-container">
<SidebarExpandButton class="sidebar-expand-button" @click="toggleExpanded" /> <SidebarExpandButton class="sidebar-expand-button" @click="toggleSidebar" />
</div> </div>
<Sidebar @toggle-expanded="toggleExpanded" :expanded="expanded" class="sidebar"> <Sidebar @toggle-expanded="toggleSidebar" :expanded="expanded" class="sidebar">
<slot name="sidebar" /> <slot name="sidebar" />
</Sidebar> </Sidebar>
<main class="main-content"> <main class="main-content">