-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb8db1e
commit 42d9e22
Showing
5 changed files
with
130 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
|
||
const Offcanvas = ({ isOpen, onClose, children }) => { | ||
return ( | ||
<div className={`${isOpen ? 'fixed' : 'hidden'} inset-0 overflow-hidden`} | ||
style={ | ||
{ | ||
zIndex: 20 | ||
} | ||
}> | ||
<div className="absolute inset-0 overflow-hidden"> | ||
{/* Background overlay */} | ||
<div className="absolute inset-0 bg-gray-500 bg-opacity-50 transition-opacity" onClick={onClose}></div> | ||
|
||
{/* Offcanvas Panel from Bottom */} | ||
<section className="absolute bottom-0 w-full" | ||
|
||
> | ||
{/* Offcanvas Panel */} | ||
<div className="relative w-full mx-auto" > | ||
<div className="flex flex-col h-96 bg-white shadow-xl overflow-y-scroll"> | ||
|
||
<div className="mt-6 relative flex-1 px-4 sm:px-6"> | ||
{/* Place your content here */} | ||
{children} | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Offcanvas; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42d9e22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
genbank-view – ./
genbank-view-git-main-theosanderson.vercel.app
genbank-view.vercel.app
gensplore.genomium.org
genbank-view-theosanderson.vercel.app
gensplore.theo.io