fix(sidebar): scope elevated mobile z-index to course sidebar
Remove the global z-150 mobile sheet stacking from Sidebar.Root so LMS and org sidebars keep the default sheet layer. Course sidebar opts in via mobileOverlayClass and its existing z-150 class. Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
035d976d14
commit
b888725125
@@ -112,7 +112,7 @@
|
||||
{#if !isOrgLoaded}
|
||||
<SidebarSkeleton />
|
||||
{:else}
|
||||
<Sidebar.Root collapsible="icon" class="ui:z-150!">
|
||||
<Sidebar.Root collapsible="icon" class="ui:z-150!" mobileOverlayClass="ui:z-150!">
|
||||
<Sidebar.Header>
|
||||
<CourseSidebarLogo />
|
||||
</Sidebar.Header>
|
||||
|
||||
@@ -11,12 +11,14 @@
|
||||
variant = 'sidebar',
|
||||
collapsible = 'offcanvas',
|
||||
class: className,
|
||||
mobileOverlayClass,
|
||||
children,
|
||||
...restProps
|
||||
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
||||
side?: 'left' | 'right';
|
||||
variant?: 'sidebar' | 'floating' | 'inset';
|
||||
collapsible?: 'offcanvas' | 'icon' | 'none';
|
||||
mobileOverlayClass?: string;
|
||||
} = $props();
|
||||
|
||||
const sidebar = useSidebar();
|
||||
@@ -39,9 +41,9 @@
|
||||
data-sidebar="sidebar"
|
||||
data-slot="sidebar"
|
||||
data-mobile="true"
|
||||
overlayClass="ui:z-150!"
|
||||
overlayClass={mobileOverlayClass}
|
||||
class={cn(
|
||||
'ui:bg-sidebar ui:text-sidebar-foreground ui:w-(--sidebar-width) ui:z-150! ui:p-0 ui:[&>button]:hidden',
|
||||
'ui:bg-sidebar ui:text-sidebar-foreground ui:w-(--sidebar-width) ui:p-0 ui:[&>button]:hidden',
|
||||
className
|
||||
)}
|
||||
style="--sidebar-width: {SIDEBAR_WIDTH_MOBILE};"
|
||||
|
||||
Reference in New Issue
Block a user