modal and openers

This commit is contained in:
2021-07-30 22:54:36 +02:00
parent baa04685be
commit ab20c0693c
8 changed files with 63 additions and 12 deletions

21
src/components/Modal.tsx Normal file
View File

@@ -0,0 +1,21 @@
import React from "react"
import style from "./../style/Modal.module.scss"
interface Props {
show: boolean
onCloseClick?: ()=>void
}
const Modal: React.FC<Props> = (props) => {
return (
<div className={`${style.overlay} ${!props.show && style.hidden}`} onClick={()=>{
props.onCloseClick?.()
}}>
<div className={style.body}>
{props.children}
</div>
</div>
)
}
export default Modal