[material-ui] Improve slot.transition
and TransitionProps
types
#40650
Labels
breaking change
component: transitions
This is the name of the generic UI component, not the React module!
customization: slot
Component's slot customizability
enhancement
This is not a bug, nor a new feature
package: material-ui
Specific to @mui/material
typescript
The
TransitionProps
is based on the type with the same name coming fromreact-transition-group/Transition
. Thechildren
prop is optional. There are a bunch of places where we do this to makechildren
required:We should standardize how we treat
children
inTransitionProps
across the codebase. Potential solutions that can be explored:children
required inTransitionProps
(material-ui).Other things to consider:
Some
slots.transition
props (Accordion, Backdrop, SpeedDial) have the following type:The correct type should probably be:
Improving the types should fix this issue in an Accordion demo: [material-ui][docs] Revise the Accordion page #40284 (comment)
Search keywords: slots transition typescript
The text was updated successfully, but these errors were encountered: