You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
677 B
JavaScript
25 lines
677 B
JavaScript
import React from "react";
|
|
|
|
|
|
export default function Modal({ isOpen, toggle = () => {}, children, title = ''}) {
|
|
return (
|
|
<div
|
|
className={`modal`}
|
|
style={
|
|
isOpen
|
|
? {
|
|
opacity: 1,
|
|
pointerEvents: 'auto',
|
|
visibility: 'visible',
|
|
}
|
|
: {}
|
|
}>
|
|
<div className={`modal-box`} style={{minHeight: '40em'}}>
|
|
<h1 className="font-bold text-2xl pb-8">
|
|
{title}
|
|
</h1>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
)
|
|
} |