Move a Material UI component prop into a slot
ProprietaryMoves a deprecated prop of a Material UI component into its slots or slotProps prop. Tags whose target is not an object literal, or already sets that slot, are left alone.
org. openrewrite. react. mui. move-component-prop-to-slotRequired
The Material UI component, such as Dialog.
The deprecated prop to move.
The prop the value moves into, slots or slotProps.
The key under the target prop.
Optional
A key under the slot, when the prop becomes one prop of the slot.
A package that re-exports Material UI, when the components are not imported from Material UI itself.
mod run . --recipe= org. openrewrite. react. mui. move-component-prop-to-slot \
-P componentName= Dialog \
-P propName= TransitionComponent \
-P targetProp= slots \
-P slotName= transitionInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.