-
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.
feat: Add right-click context menu for copying sequence selections
- Loading branch information
1 parent
54de7c1
commit c1b055d
Showing
2 changed files
with
78 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
const ContextMenu = ({ x, y, onClose, onCopy, onCopyRC }) => { | ||
if (x === null || y === null) return null; | ||
|
||
return ( | ||
<div | ||
className="fixed bg-white shadow-lg border border-gray-200 rounded-md py-1 z-50" | ||
style={{ left: x, top: y }} | ||
> | ||
<button | ||
className="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" | ||
onClick={onCopy} | ||
> | ||
Copy Selection | ||
</button> | ||
<button | ||
className="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" | ||
onClick={onCopyRC} | ||
> | ||
Copy as Reverse Complement | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ContextMenu; |
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