Skip to content

Commit

Permalink
feat: 모달 바깥, 엑스 버튼 클릭 시 handleClose 함수 호출
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoribogo committed Nov 28, 2023
1 parent 89dba8f commit dd21d2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ const Modal = ({
<>
<input className="modal-state" id={id} type="checkbox" />
<div className="modal">
<label className="modal-overlay" htmlFor={id}></label>
<label
className="modal-overlay"
htmlFor={id}
onClick={handleClose}
></label>
<div className="modal-content flex w-80 flex-col items-center gap-8 rounded-md bg-white p-5 dark:bg-main-gray">
<label
htmlFor={id}
className="btn h-fit w-fit justify-center self-end bg-transparent p-0"
onClick={handleClose}
>
<CloseIcon className="dark:fill-white" />
</label>
Expand Down

0 comments on commit dd21d2f

Please sign in to comment.