Swipe away

This commit is contained in:
jkingsman
2026-03-25 08:42:40 -07:00
parent 5b05fdefa1
commit b0f5930e01

View File

@@ -98,6 +98,13 @@ export function AppShell({
},
trackTouch: true,
trackMouse: false,
preventScrollOnSwipe: true,
});
const closeSwipeHandlers = useSwipeable({
onSwipedLeft: () => onSidebarOpenChange(false),
trackTouch: true,
trackMouse: false,
preventScrollOnSwipe: false,
});
@@ -208,7 +215,7 @@ export function AppShell({
<SheetTitle>Navigation</SheetTitle>
<SheetDescription>Sidebar navigation</SheetDescription>
</SheetHeader>
<div className="flex-1 overflow-hidden">{activeSidebarContent}</div>
<div className="flex-1 overflow-hidden" {...closeSwipeHandlers}>{activeSidebarContent}</div>
</SheetContent>
</Sheet>