We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2bf612 + 35c3c8b commit b95a0daCopy full SHA for b95a0da
src/components/SnippetModal.tsx
@@ -23,7 +23,14 @@ const SnippetModal: React.FC<Props> = ({
23
useEscapeKey(handleCloseModal);
24
25
return ReactDOM.createPortal(
26
- <div className="modal-overlay">
+ <div
27
+ className="modal-overlay"
28
+ onClick={(e) => {
29
+ if (e.target === e.currentTarget) {
30
+ handleCloseModal();
31
+ }
32
+ }}
33
+ >
34
<div className="modal | flow" data-flow-space="lg">
35
<div className="modal__header">
36
<h2 className="section-title">{snippet.title}</h2>
0 commit comments