Explorar o código

[dialog] add background click handler to dialog overlay

mightyplow %!s(int64=6) %!d(string=hai) anos
pai
achega
bfe12c687b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/dialog/Dialog.jsx

+ 1 - 1
src/dialog/Dialog.jsx

@@ -8,7 +8,7 @@ function Dialog ({}, children) {
         }
 
         return (
-            <Overlay>
+            <Overlay onBackgroundClick={actions.dialog.close}>
                 <button className={style.close} onclick={actions.dialog.close} />
 
                 <div className={style.content}>