2023-01-29 16:44:02 +01:00
|
|
|
export const Modal = ({ cancel, children }) => (
|
2022-10-12 20:40:08 +02:00
|
|
|
<div
|
|
|
|
className={`
|
|
|
|
fixed top-0 left-0 right-0 w-screen h-screen
|
2023-01-29 16:44:02 +01:00
|
|
|
bg-neutral bg-opacity-80 z-30
|
2022-10-12 20:40:08 +02:00
|
|
|
hover:cursor-pointer flex flex-col justify-center
|
|
|
|
`}
|
2023-01-29 16:44:02 +01:00
|
|
|
onClick={cancel}
|
2022-10-12 20:40:08 +02:00
|
|
|
>
|
|
|
|
<div
|
2023-01-29 16:44:02 +01:00
|
|
|
className="m-auto text-neutral-content lightbox"
|
2022-10-12 20:40:08 +02:00
|
|
|
style={{
|
|
|
|
maxHeight: 'calc(100vh - 6rem)',
|
|
|
|
maxWidth: 'calc(100vw - 6rem)',
|
|
|
|
}}
|
|
|
|
>
|
2023-01-29 16:44:02 +01:00
|
|
|
{children}
|
2022-10-12 20:40:08 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|