Skip to content

Commit

Permalink
Merge branch 'refactor/v3' into feature/dark-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Feb 17, 2023
2 parents c53f685 + 89a4be3 commit dcbca08
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/react/lib/Modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ const Modal = forwardRef(({
close();
};

const onCloseClick = e => {
e.preventDefault();

if (disabled || !closable) {
return;
}

close();
};

const open = () => {
if (disabled) {
return;
Expand Down Expand Up @@ -113,7 +123,7 @@ const Modal = forwardRef(({
href="#"
ref={closeButtonRef}
className="close"
onClick={onBackdropClick}
onClick={onCloseClick}
>
<Remove />
</a>
Expand Down

0 comments on commit dcbca08

Please # to comment.