Skip to content

Commit

Permalink
test: apple keyboard on drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed Oct 21, 2024
1 parent 417dcf8 commit 1586497
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
1 change: 1 addition & 0 deletions dist/assets/index-2N_hARzC.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/index-DiyCfMR6.css

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/jpg" href="/dbca.jpg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DBCA</title>
<script type="module" crossorigin src="/assets/index-D-_G56yz.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DiyCfMR6.css">
<script type="module" crossorigin src="/assets/index-neC_ouKu.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-2N_hARzC.css">
</head>

<body>
Expand Down
32 changes: 17 additions & 15 deletions src/components/ui/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,23 @@ const DrawerContent = React.forwardRef<
return () => window.removeEventListener("resize", handleResize);
}, []);

<DrawerPortal>
<DrawerOverlay />
<DrawerPrimitive.Content
ref={ref}
className={cn(
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[95%] flex-col rounded-t-[10px] border bg-background",
className,
)}
style={{ bottom: `${keyboardHeight}px` }}
{...props}
>
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
{children}
</DrawerPrimitive.Content>
</DrawerPortal>;
return (
<DrawerPortal>
<DrawerOverlay />
<DrawerPrimitive.Content
ref={ref}
className={cn(
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[95%] flex-col rounded-t-[10px] border bg-background",
className,
)}
style={{ bottom: `${keyboardHeight}px` }}
{...props}
>
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
{children}
</DrawerPrimitive.Content>
</DrawerPortal>
);
});
DrawerContent.displayName = "DrawerContent";

Expand Down

0 comments on commit 1586497

Please sign in to comment.