Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mui.themeProvider has incorrect import statement #28

Closed
Shmew opened this issue Nov 10, 2019 · 6 comments
Closed

Mui.themeProvider has incorrect import statement #28

Shmew opened this issue Nov 10, 2019 · 6 comments

Comments

@Shmew
Copy link
Owner

Shmew commented Nov 10, 2019

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
@cmeeren
Copy link
Collaborator

cmeeren commented Nov 10, 2019

What? I was certain I tested it. Did they change something again? (Related: #27)

I'll have a look at it.

@cmeeren
Copy link
Collaborator

cmeeren commented Nov 10, 2019

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?

@cmeeren
Copy link
Collaborator

cmeeren commented Nov 10, 2019

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.

@cmeeren
Copy link
Collaborator

cmeeren commented Nov 10, 2019

Will be released shortly as 0.8.1.

@cmeeren cmeeren closed this as completed Nov 10, 2019
@Shmew
Copy link
Owner Author

Shmew commented Nov 10, 2019

Ah, didn't know they were making that change. Thanks!

@cmeeren
Copy link
Collaborator

cmeeren commented Nov 10, 2019

Import statement was still broken in 0.8.1, releasing fix in 0.8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants