Skip to content

Commit 9fe52fb

Browse files
authored
[docs] Improve migration guide for @material-ui/styles (mui#26552)
1 parent 97ca47a commit 9fe52fb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/src/pages/guides/migration-v4/migration-v4.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,3 +1834,15 @@ If you are using the utilities from `@material-ui/styles` together with the `@ma
18341834
-import { ThemeProvider } from '@material-ui/styles';
18351835
+import { ThemeProvider } from '@material-ui/core/styles';
18361836
```
1837+
1838+
#### Default theme (TypeScript)
1839+
1840+
The `@material-ui/styles` package is no longer part of `@material-ui/core/styles`. If you are using `@material-ui/styles` together with `@material-ui/core` you need to add a module augmentation for the `DefaultTheme`.
1841+
1842+
```ts
1843+
import { Theme } from '@material-ui/core/styles';
1844+
1845+
declare module '@material-ui/styles' {
1846+
interface DefaultTheme extends Theme {}
1847+
}
1848+
```

0 commit comments

Comments
 (0)