Replace a Material UI component class

Proprietary

Replaces a class of a Material UI component in its classes prop, in xClasses members and in .MuiComponent-class selectors. With several new classes only selectors are rewritten.

org.openrewrite.react.mui.replace-component-class

Required

The Material UI component.

The class key that is replaced.

The class key that replaces it, or several separated by commas that a selector gets one after the other.

Optional

A package that re-exports Material UI.

mod run . --recipe=org.openrewrite.react.mui.replace-component-class \ -P componentName=Avatar \ -P oldClass=circle \ -P newClasses=circular

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.