import * as React from 'react'; import Button from '@mui/joy/Button'; import Modal from '@mui/joy/Modal'; import ModalDialog from '@mui/joy/ModalDialog'; import DialogTitle from '@mui/joy/DialogTitle'; import DialogContent from '@mui/joy/DialogContent'; type NestedModalsProps = { random?: boolean; }; function randomBetween(min: number, max: number) { return Math.floor(Math.random() * (max - min + 1)) + min; } function NestedModals({ random }: NestedModalsProps) { const [open, setOpen] = React.useState(false); return ( setOpen(false)}> Infinite modals Welcome to the infinite nested modals. ); } export default NestedModals;