mirror of
https://github.com/documenso/documenso.git
synced 2025-11-25 22:21:31 +10:00
add reducedMotion check, center menu items
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { Menu, X } from 'lucide-react';
|
||||
|
||||
import { Button } from '@documenso/ui/primitives/button';
|
||||
@ -8,6 +12,14 @@ export interface HamburgerMenuProps {
|
||||
}
|
||||
|
||||
export const HamburgerMenu = ({ isMenuOpen, menuToggle }: HamburgerMenuProps) => {
|
||||
useEffect(() => {
|
||||
// Update document.body.style.overflow based on the menu state
|
||||
// and check that the window width is less than 768px
|
||||
// if (window.innerWidth < 768) {
|
||||
// document.body.style.overflow = isMenuOpen ? 'hidden' : 'auto';
|
||||
// }
|
||||
}, [isMenuOpen]);
|
||||
|
||||
return (
|
||||
<div className="flex md:hidden">
|
||||
<Button variant="default" className="z-20 w-10 p-0" onClick={menuToggle}>
|
||||
|
||||
Reference in New Issue
Block a user