Skip to content

Commit

Permalink
fix: change button to div for modal background and add role attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeongmin committed Feb 4, 2025
1 parent 5e48e6b commit fa76ec4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/client/src/shared/ui/modal/useModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function Background({ children }: Readonly<PropsWithChildren>) {
}, [closeModal]);

return (
<button
<div
role='dialog'
onClick={(e) => {
e.stopPropagation();
if (e.target === e.currentTarget) closeModal();
Expand All @@ -44,7 +45,7 @@ function Background({ children }: Readonly<PropsWithChildren>) {
className='fixed left-0 top-0 z-10 flex h-dvh w-dvw cursor-auto items-center justify-center bg-[#808080]/20 backdrop-blur-sm'
>
{children}
</button>
</div>
);
}

Expand Down

0 comments on commit fa76ec4

Please sign in to comment.