feat: close dialog on overlay click

pull/120/head
sualko 2021-01-23 11:53:00 +01:00
parent a541e4bfca
commit 88a992fa12
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ const Dialog: React.FC<Props> = ({open, title, children, onClose = () => undefin
return (
<>
<div className="oc-dialog-dim"> </div>
<div className="oc-dialog-dim" onClick={() => onClose()}> </div>
<div className="oc-dialog bbb-dialog" tabIndex={-1} role="dialog" style={{display:'inline-block', position: 'fixed'}}>
<h2 className="oc-dialog-title">{title}</h2>
<a className="oc-dialog-close" onClick={ev => {ev.preventDefault(); onClose();}}></a>