@@ -4,8 +4,10 @@ import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
44import { useRightSidebar } from " @/composables/useRightSidebar" ;
55import SidebarMobileSync from " ./SidebarMobileSync.vue" ;
66import { inject , computed } from " vue" ;
7+ import { useOverlayScrollbarsOptions } from " ~/composables/useOverlayScrollbarsOptions" ;
78
89const { rightSidebarOpen, setRightSidebarOpen } = useRightSidebar ();
10+ const { options : scrollbarOptions } = useOverlayScrollbarsOptions ();
911
1012// Inject values from default.vue
1113const showLeftNav = inject <ReturnType <typeof computed <boolean >>>(" showLeftNav" );
@@ -26,17 +28,23 @@ const containContentValue = computed(() => containContent?.value ?? true);
2628 class="min-h-0 h-full"
2729 >
2830 <SidebarMobileSync />
29- <SidebarInset class="overflow-scroll min-h-0 h-full">
30- <!-- todo fix bg color bg-muted/10 -->
31- <div
32- class =" p-4 w-full self-center"
33- :class =" {
34- 'mx-auto': !showLeftNavValue,
35- 'lg:max-w-7xl': containContentValue,
36- }"
31+ <SidebarInset class="overflow-hidden min-h-0 h-full">
32+ <OverlayScrollbars
33+ element="div"
34+ :options =" scrollbarOptions "
35+ defer
36+ class="h-full"
3737 >
38- <slot ></slot >
39- </div >
38+ <div
39+ class =" p-4 w-full self-center"
40+ :class =" {
41+ 'mx-auto': !showLeftNavValue,
42+ 'lg:max-w-7xl': containContentValue,
43+ }"
44+ >
45+ <slot ></slot >
46+ </div >
47+ </OverlayScrollbars >
4048 </SidebarInset >
4149
4250 <AppSidebar side="right" class="main-content-sidebar" />
0 commit comments