Skip to content

Commit

Permalink
feat: close polaroid detail modal when outside click
Browse files Browse the repository at this point in the history
  • Loading branch information
hwanheejung committed Dec 19, 2024
1 parent 7819538 commit 8e1dca6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Polaroid/PolaroidDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,9 @@ const PolaroidDetailModal = ({
}

return (
<Modal isOpen={isOpen} onClose={onClose} closeOnOutsideClick={false}>
<Modal isOpen={isOpen} onClose={onClose}>
<div className="relative mx-auto flex h-dvh max-w-md flex-1 touch-pan-x flex-col justify-center overflow-x-hidden py-10">
<CloseIcon
className="absolute left-5 top-5 cursor-pointer text-gray-0"
onClick={onClose}
/>

<CloseIcon className="absolute left-5 top-5 cursor-pointer text-gray-0" />
<div className="relative touch-pan-x overflow-x-hidden">
<Carousel
ref={carouselRef}
Expand Down Expand Up @@ -120,6 +116,10 @@ const PolaroidDetailModal = ({
/>
</div>
)}
<div
className="absolute left-0 top-0 h-full w-full"
onClick={onClose}
/>
</div>
</Modal>
)
Expand Down

0 comments on commit 8e1dca6

Please sign in to comment.