fix: ui fixes
This commit is contained in:
@@ -7,10 +7,18 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
const Drawer = ({
|
||||
shouldScaleBackground = true,
|
||||
// On iOS vaul freezes <body> (position:fixed) while the drawer is open and
|
||||
// restores the old scroll offset on close. When a link inside the drawer
|
||||
// navigates, that restore fires AFTER the route change and drags the new
|
||||
// page to the previous page's scroll position — from the bottom of a long
|
||||
// page it looks like the link simply didn't work. This flag makes vaul
|
||||
// skip the restore when the URL changed; plain dismissals still restore.
|
||||
preventScrollRestoration = true,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
||||
<DrawerPrimitive.Root
|
||||
shouldScaleBackground={shouldScaleBackground}
|
||||
preventScrollRestoration={preventScrollRestoration}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user