I am using MUI Slide Transition component to display a dialog.
On the click of a button I succeeded in displaying the Dialog with a SlideUp Transition.
Now, on dismiss I also want it to Slide Up again to dismiss. How can that be achieved.
Here is the transition I used:
const Transition = React.forwardRef(function Transition(props, ref) {
return <Slide
direction="up"
mountOnEnter
unmountOnExit
ref={ref} {...props} />;
});
<Dialog
open={openDialog}
TransitionComponent={Transition}
keepMounted
onClose={handleClickAway}
>