import * as React from 'react';
import PropTypes from 'prop-types';
import Backdrop from '@mui/material/Backdrop';
import Box from '@mui/material/Box';
import Modal from '@mui/material/Modal';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import { useSpring, animated } from '@react-spring/web';
const Fade = React.forwardRef(function Fade(props, ref) {
const {
children,
in: open,
onClick,
onEnter,
onExited,
ownerState,
...other
} = props;
const style = useSpring({
from: { opacity: 0 },
to: { opacity: open ? 1 : 0 },
onStart: () => {
if (open && onEnter) {
onEnter(null, true);
}
},
onRest: () => {
if (!open && onExited) {
onExited(null, true);
}
},
});
return (