modal prevent propagation

This commit is contained in:
Djeeberjr 2021-07-30 23:45:46 +02:00
parent 4d28da04a6
commit 79fe625ae7

View File

@ -11,7 +11,9 @@ const Modal: React.FC<Props> = (props) => {
<div className={`${style.overlay} ${!props.show && style.hidden}`} onClick={()=>{ <div className={`${style.overlay} ${!props.show && style.hidden}`} onClick={()=>{
props.onCloseClick?.() props.onCloseClick?.()
}}> }}>
<div className={style.body}> <div className={style.body} onClick={(e)=>{
e.stopPropagation()
}}>
{props.children} {props.children}
</div> </div>
</div> </div>