import * as React from 'react'; import PropTypes from 'prop-types'; 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'; function randomBetween(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function NestedModals({ random }) { const [open, setOpen] = React.useState(false); return ( setOpen(false)}> Infinite modals Welcome to the infinite nested modals. ); } NestedModals.propTypes = { random: PropTypes.bool, }; export default NestedModals;