Skip to content

Commit 2da61e5

Browse files
committed
fix(shop): cart drawer z-index above navbar
The drawer overlay and content were at z-50, matching the navbar. On mobile the navbar's stacking context won (earlier in the DOM), hiding the drawer's close button and header underneath the topbar. Bumped both to z-[100] so the drawer always overlays the entire page including the navbar — standard modal behavior.
1 parent d20c738 commit 2da61e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/shop/CartDrawer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ export function CartDrawer({ open, onOpenChange }: CartDrawerProps) {
2828
<Dialog.Portal>
2929
<Dialog.Overlay
3030
className={twMerge(
31-
'fixed inset-0 z-50 bg-black/40',
31+
'fixed inset-0 z-[100] bg-black/40',
3232
'data-[state=open]:animate-in data-[state=open]:fade-in-0',
3333
'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
3434
)}
3535
/>
3636
<Dialog.Content
3737
className={twMerge(
38-
'fixed right-0 top-0 bottom-0 z-50 w-full sm:max-w-md flex flex-col',
38+
'fixed right-0 top-0 bottom-0 z-[100] w-full sm:max-w-md flex flex-col',
3939
'bg-white dark:bg-gray-950 shadow-xl border-l border-gray-200 dark:border-gray-800',
4040
'data-[state=open]:animate-in data-[state=open]:slide-in-from-right',
4141
'data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right',

0 commit comments

Comments
 (0)