Skip to content

Commit

Permalink
Update modal auto closing
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgahan-arikan committed Dec 14, 2023
1 parent 36a0cea commit 2424e23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ export const Modal = (props: PropsWithChildren<ModalProps>) => {
className={styles.contentVariants({ autoHeight, size })}
forceMount
onEscapeKeyDown={ev => {
ev.preventDefault()
if (isDismissible) {
onClose?.()
} else {
ev.preventDefault()
}
}}
onInteractOutside={ev => {
if (!isDismissible) {
ev.preventDefault()
ev.preventDefault()
if (isDismissible) {
onClose?.()
}
}}
>
Expand Down

0 comments on commit 2424e23

Please sign in to comment.