Skip to content

Commit

Permalink
removed scaling and fixed overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-Gordon committed Mar 28, 2024
1 parent 89740b6 commit b542d7b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/@drawer/(.)menu/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Page() {

return (
<>
<Drawer shouldScaleBackground={true} open={isNavOpen}>
<Drawer shouldScaleBackground={false} open={isNavOpen}>
<DrawerContent className='ios'>
<SendNotification />
<DrawerFooter>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Layouts/SheetLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const SheetLayout = ({ children }) => {
<Sheet.Backdrop onTap={() => dispatch(setSheet(false))} />
</Sheet> */}
<Drawer
shouldScaleBackground={true}
shouldScaleBackground={false}
onClose={() => {
dispatch(setSheet(false));
window.history.pushState({}, '', '/home');
Expand Down
12 changes: 5 additions & 7 deletions src/app/components/ui/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Drawer as DrawerPrimitive } from 'vaul';
import { cn } from '@/lib/utils';

const Drawer = ({
shouldScaleBackground = true,
shouldScaleBackground = false,
...props
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
<DrawerPrimitive.Root
Expand All @@ -28,12 +28,10 @@ const DrawerOverlay = React.forwardRef<
>(({ className, ...props }, ref) => (
<DrawerPrimitive.Overlay
ref={ref}
style={{
backgroundImage: 'radial-gradient(transparent 30%, black)',
WebkitMaskImage:
'-webkit-radial-gradient(900px at center, transparent 30%, black)',
}}
className={cn('fixed inset-0 z-50 bg-black/80 transition-all duration-700', className)}
className={cn(
'fixed inset-0 z-50 bg-black/80 transition-all duration-300 ease-in-out ',
className
)}
{...props}
/>
));
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export default function RootLayout({
<AnimatePresence mode='wait' initial={false}>
<LayoutGroup>
<div
vaul-drawer-wrapper=''
className='h-[100vh] text-gray-300'
/* vaul-drawer-wrapper=''
*/ className=''
>
<div>{auth}</div>
<div>{drawer}</div>
Expand Down

0 comments on commit b542d7b

Please sign in to comment.