Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sticky hamburger menu for mobile version #460

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions components/Navbar/navDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const NavDrop = forwardRef((props, ref)=> {
const {setDrop}=props;
const [show, setShow] = useState(null);
return (
<div ref ={ref} className='absolute ml-[-20px] top-16 w-full bg-[#1B1130]'>
<div ref ={ref} className='z-[99] absolute left-0 top-[74px] w-full h-screen bg-[#1B1130]/90 backdrop-filter backdrop-blur-md'>
<div className='flex flex-col p-5 pb-8 w-full'>
{links.map((link) => {
return (
Expand All @@ -22,13 +22,10 @@ const NavDrop = forwardRef((props, ref)=> {
>
{link.subMenu ? (
<div>
<div className='flex items-center justify-between'
>
<div className='flex'>
<div className='text-white'>{link.title}</div>
<Dropdown
className={`transition-transform duration-700 ${
show === link.title ? 'rotate-0' : 'rotate-[-90deg]'
}`}
className={`transition-transform duration-700`}
/>
</div>
{show && show === link.title && (
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Navbar() {
};

return (
<div className='flex justify-center items-center sticky top-0 z-[99] text-white'>
<div className={`flex justify-center items-center fixed w-full backdrop-blur ${ drop && 'bg-[#1B1130]/90'} top-0 z-[99] text-white`}>
<div className='w-[1131px]'>
<div className='p-5 flex justify-between h-[75px] w-full items-center'>
<div className='flex items-center sm:justify-between sm:w-full' data-test="nav-Home">
Expand All @@ -86,7 +86,7 @@ function Navbar() {
<Cancel />
</button>
) : (
<button >
<button>
<Hamburger ref={svg} />
</button>
)}
Expand Down