import * as React from "react" import clsx from "clsx" import { Modal as BaseModal, ModalBackdropSlotProps, ModalProps, } from "@mui/base/Modal" import XIcon from "../icons/X" import { FadeIn } from "./FadeIn" const Backdrop = React.forwardRef( function Backdrop(props, ref) { const { open, ownerState, onClick, ...other } = props return (
) } ) type FrameProps = React.ComponentPropsWithoutRef & { as?: T title: string footer: React.ReactNode onClose?: ModalProps["onClose"] } function Frame(props: FrameProps) { const { as, title, footer, onClose, children, ...other } = props let Component = as ?? "div" return (
{title}
{children}
{footer}
) } export function Modal( props: ModalProps & { frame?: FrameProps } ) { const { className, children, frame, onClose, ...other } = props return (
{frame ? ( {children} ) : ( children )}
) } Modal.displayName = "Modal"