Mui.themeProvider has incorrect import statement
Shmew opened this issue · 6 comments
Mui.themeProvider is currently not functioning, as it fails to import.
The generated code is here
The relevant section of their export in the index.d.ts file:
export {
createGenerateClassName,
createMuiTheme,
createStyles,
jssPreset,
makeStyles,
MuiThemeProvider,
responsiveFontSizes,
ServerStyleSheets,
styled,
StyleRulesCallback,
StylesProvider,
Theme,
useTheme,
withStyles,
WithStyles,
withTheme,
WithTheme,
} from './styles';
Returns this error when compiling:
WARNING in ./src/Client/App/View.fs 251:48-61
"export 'ThemeProvider' was not found in '@material-ui/core'
@ ./src/Client/Entry.fs
@ ./src/Client/Client.fsproj
@ multi ./src/Client/Client.fsproj ./src/Client/scss/main.scss
What? I was certain I tested it. Did they change something again? (Related: #27)
I'll have a look at it.
mui/material-ui#17900 (comment) says
Also, as MuiThemeProvider is no longer documented since v4.0.0, we might as well encourage
ThemeProvider
instead.
Do you know where this ThemeProvider
is and how to import it?
Nevermind, I found it: https://material-ui.com/styles/api/#themeprovider
The correct import would be:
import "ThemeProvider" "@material-ui/core/styles"
My mistake. I'll fix it.
Will be released shortly as 0.8.1.
Ah, didn't know they were making that change. Thanks!
Import statement was still broken in 0.8.1, releasing fix in 0.8.2.