From e8c9d4a7ace3b4f7a32d672f82d66d1047044891 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Tue, 21 May 2024 18:04:44 +0200 Subject: [PATCH] WIP! update docs Signed-off-by: Grigorii K. Shartsev --- src/components/NcAppSidebar/NcAppSidebar.vue | 96 ++++++++++++++++++-- 1 file changed, 87 insertions(+), 9 deletions(-) diff --git a/src/components/NcAppSidebar/NcAppSidebar.vue b/src/components/NcAppSidebar/NcAppSidebar.vue index 988bcfeacb..879a8e3eb3 100644 --- a/src/components/NcAppSidebar/NcAppSidebar.vue +++ b/src/components/NcAppSidebar/NcAppSidebar.vue @@ -371,14 +371,13 @@ A working alternative would be using an icon together with an `aria-label`: ``` -### Conditionally show the sidebar +### Conditionally show the sidebar with `open` -If the sidebar should be shown conditionally (e.g. using a button) -and the users are expected to open and close the sidebar multiple times, -then using `v-if` might result in bad performance. -So instead use the `open` property. +If the sidebar should be shown conditionally, you can use `open` prop to define sidebar visibility. +It automatically shows a toggle button to open the sidebar if it is closed. -You can also use `--app-sidebar-offset` CSS variable to preserve space for the toggle button, for example, in top bar of NcAppContent. +You can also use `--app-sidebar-offset` CSS variable to preserve space +for the toggle button, for example, in top bar of `NcAppContent`. ```vue