File tree Expand file tree Collapse file tree
packages/mui-material/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ export type DrawerSlotsAndSlotProps = CreateSlotsAndSlotProps<
8585 * By default, the available props are based on the [Slide](https://mui.com/material-ui/api/slide/#props) component.
8686 */
8787 transition : SlotProps <
88- React . ElementType < TransitionProps > ,
89- TransitionProps & DrawerTransitionSlotPropsOverrides ,
88+ React . ElementType < SlideProps > ,
89+ Omit < SlideProps , 'children' > & DrawerTransitionSlotPropsOverrides ,
9090 DrawerOwnerState
9191 > ;
9292 }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ function Test() {
1515 < React . Fragment >
1616 < Drawer open /> ;
1717 < Drawer open slotProps = { { paper : paperProps } } /> ;
18+ < Drawer open slotProps = { { transition : { direction : 'left' } } } /> ;
1819 < Drawer
1920 open
2021 slotProps = { {
@@ -42,6 +43,8 @@ function Test() {
4243 'aria-hidden' : true ,
4344 } ,
4445 transition : {
46+ container : document . body ,
47+ direction : 'left' ,
4548 timeout : 500 ,
4649 } ,
4750 } }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as React from 'react';
22import { SxProps } from '@mui/system' ;
33import { SlotComponentProps } from '@mui/utils/types' ;
44import { BackdropProps } from '../Backdrop' ;
5+ import { GrowProps } from '../Grow' ;
56import { Theme } from '../styles' ;
67import { InternalStandardProps as StandardProps } from '../internal' ;
78import Paper , { PaperProps } from '../Paper' ;
@@ -57,8 +58,8 @@ export type PopoverSlotsAndSlotProps = CreateSlotsAndSlotProps<
5758 */
5859 transition : SlotComponentProps <
5960 // use SlotComponentProps because transition slot does not support `component` and `sx` prop
60- React . ElementType < TransitionProps > ,
61- TransitionProps & PopoverTransitionSlotPropsOverrides ,
61+ React . ElementType < GrowProps > ,
62+ Omit < GrowProps , 'children' > & PopoverTransitionSlotPropsOverrides ,
6263 PopoverOwnerState
6364 > ;
6465 /**
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ function Test() {
1313 return (
1414 < React . Fragment >
1515 < Popover open /> ;
16- < Popover open slotProps = { { paper : paperProps } } /> ;
16+ < Popover open PaperProps = { paperProps } /> ;
17+ < Popover open anchorEl = { document . body } slotProps = { { transition : { timeout : 'auto' } } } /> ;
1718 < Popover
1819 open
1920 slotProps = { {
Original file line number Diff line number Diff line change @@ -14,9 +14,7 @@ export interface StepContentSlots {
1414 * @default Collapse
1515 */
1616 transition ?:
17- | React . JSXElementConstructor <
18- TransitionProps & { children ?: React . ReactElement < unknown , any > | undefined }
19- >
17+ | React . JSXElementConstructor < TransitionProps & { children : React . ReactElement < unknown , any > } >
2018 | undefined ;
2119}
2220
You can’t perform that action at this time.
0 commit comments