Skip to content

Commit 046cd79

Browse files
committed
Close the 'see who liked' modal when clicked outside
1 parent 2c64a65 commit 046cd79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/modal/ListModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export default function ListModal({
2828
className="fixed inset-0 transition-opacity"
2929
aria-hidden="true"
3030
>
31-
<div className="absolute inset-0 bg-gray-500 opacity-75"></div>
31+
<div
32+
className="absolute inset-0 bg-gray-500 opacity-75"
33+
onClick={() => setIsOpen(false)}
34+
></div>
3235
</Transition>
3336

3437
{/* This element is to trick the browser into centering the modal contents. */}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy