import * as React from 'react'; import Button from '@mui/material/Button'; import Snackbar from '@mui/material/Snackbar'; import Fade from '@mui/material/Fade'; import Slide, { SlideProps } from '@mui/material/Slide'; import Grow, { GrowProps } from '@mui/material/Grow'; import { TransitionProps } from '@mui/material/transitions'; function SlideTransition(props: SlideProps) { return ; } function GrowTransition(props: GrowProps) { return ; } export default function TransitionsSnackbar() { const [state, setState] = React.useState<{ open: boolean; Transition: React.ComponentType< TransitionProps & { children: React.ReactElement; } >; }>({ open: false, Transition: Fade, }); const handleClick = ( Transition: React.ComponentType< TransitionProps & { children: React.ReactElement; } >, ) => () => { setState({ open: true, Transition, }); }; const handleClose = () => { setState({ ...state, open: false, }); }; return (
); }