Shmew / Feliz.MaterialUI

Feliz-style Fable bindings for Material-UI
https://shmew.github.io/Feliz.MaterialUI/
MIT License
69 stars 20 forks source link

Mui.themeProvider has incorrect import statement #28

Closed Shmew closed 4 years ago

Shmew commented 4 years ago

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 commented 4 years ago

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

I'll have a look at it.

cmeeren commented 4 years ago

https://github.com/mui-org/material-ui/issues/17900#issuecomment-543313736 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 commented 4 years ago

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 commented 4 years ago

Will be released shortly as 0.8.1.

Shmew commented 4 years ago

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

cmeeren commented 4 years ago

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