Rename a Material UI component prop
ProprietaryRenames a prop of a Material UI component, found through the imports of the file. Tags that already set the new prop are left alone.
org. openrewrite. react. mui. rename-component-propRequired
The Material UI component, such as Autocomplete.
The prop to rename.
The name the prop gets.
Optional
Set the renamed prop to this string. Only a prop that is set without a value, or to true, is renamed then.
A package that re-exports Material UI, when the components are not imported from Material UI itself.
mod run . --recipe= org. openrewrite. react. mui. rename-component-prop \
-P componentName= Autocomplete \
-P oldPropName= closeIcon \
-P newPropName= clearIconInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.