import { Modal as ModalRAC, ModalOverlay } from "react-aria-components"

import Button from "./Button"
import ModalContent from "./ModalContent"

import styles from "./modal.module.css"

export default function Modal({ children }: React.PropsWithChildren) {
  return (
    <ModalOverlay className={styles.overlay} isDismissable>
      <ModalRAC className={styles.modal}>{children}</ModalRAC>
    </ModalOverlay>
  )
}

Modal.Button = Button
Modal.Content = ModalContent
