import * as React from 'react'; import { expectType } from '@mui/types'; import Drawer, { DrawerProps } from '@mui/material/Drawer'; import Grow from '@mui/material/Grow'; import { PaperProps } from '@mui/material/Paper'; const paperProps: PaperProps<'span'> = { component: 'span', onClick: (event) => { expectType, typeof event>(event); }, }; function Test() { return ( ; ; ); } ; function Noop() { return null; } ; function Custom(props: DrawerProps) { const { slotProps, ...dialogProps } = props; return ( { const transitionProps = typeof slotProps?.transition === 'function' ? slotProps.transition(ownerState) : slotProps?.transition; return { ...transitionProps, onExited: (node) => { transitionProps?.onExited?.(node); }, }; }, }} {...dialogProps} > test ); }