瀏覽代碼

[dialog] add background click handler to dialog overlay

mightyplow 6 年之前
父節點
當前提交
bfe12c687b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/dialog/Dialog.jsx

+ 1 - 1
src/dialog/Dialog.jsx

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