Browse Source

[dialog] add background click handler to dialog overlay

mightyplow 6 năm trước cách đây
mục cha
commit
bfe12c687b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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}>