import { ReactNode } from 'react'

interface Props {
  children: ReactNode
  isOpen: boolean
}

export default function Modal({ children, isOpen }: Props) {
  if (!isOpen) return null

  return (
    <div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50">
      {children}
    </div>
  )
}
