mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 04:12:47 +02:00
feat: add keyboard accessibility to ExpandedMediaOverlay for closing with Escape key
This commit is contained in:
parent
c76ff79bc4
commit
5f15ce9d1a
1 changed files with 3 additions and 0 deletions
|
|
@ -69,6 +69,9 @@ function ExpandedMediaOverlay({
|
|||
transition={{ duration: 0.2 }}
|
||||
className="fixed inset-0 z-100 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm sm:p-8"
|
||||
onClick={onClose}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Escape') onClose();
|
||||
}}
|
||||
>
|
||||
{mediaElement}
|
||||
</motion.div>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue