Merge pull request #33054 from StateFarmIns/theme-fix-mui-5-class-name-prefix

fix: MUI 5 v5- class name prefix reliability
This commit is contained in:
Patrik Oldsberg
2026-04-03 19:15:45 +02:00
committed by GitHub
3 changed files with 60 additions and 0 deletions
@@ -47,6 +47,9 @@ export interface UnifiedThemeProviderProps {
* This call needs to be in the same module as the `UnifiedThemeProvider` to ensure that it doesn't get removed by tree shaking
*/
ClassNameGenerator.configure(componentName => {
if ((componentName ?? '').startsWith('v5-')) {
return componentName;
}
return `v5-${componentName}`;
});