cca-io / rescript-mui

ReScript bindings for MUI
MIT License
254 stars 52 forks source link

Snackbar anchorOrigin not working as expected. Snackbar.Horizontal.center throws compiler error #118

Closed LukasDeco closed 3 years ago

LukasDeco commented 3 years ago

Hello and thanks for the great bindings library!

I've noticed that the Snackbar.Horizontal.center value has been throwing an error about being an unbound type constructor. I've looked at the source code and it is definitely there. So not sure what is going on.

Here are my versions: "@jsiebern/bs-material-ui": "2.0.2", "@jsiebern/bs-material-ui-lab": "2.0.3", "bs-platform": "^8.3.1",

Here is my sample code:

           <MaterialUi.Snackbar
               anchorOrigin={MaterialUi.Snackbar.AnchorOrigin.make(
                 ~horizontal: MaterialUi_Snackbar.Horizontal.center,
                 ~vertical: MaterialUi_Snackbar.Vertical.top,
                 (),
               )}
               _open=true
               onClose={(_, _) => setHasCopied(_ => false)}
               autoHideDuration={MaterialUi_Types.Number.int(2000)}
               message={React.string("Copied to Clipboard!")}
             />
LukasDeco commented 3 years ago

All of a sudden it is working... not sure what changed. Looking at the code here it is exactly the same. Oh well!

jsiebern commented 3 years ago

@LukasDeco That is quite curious. Was that error coming from JS? If it happens again, can you check out the JS output of the MaterialUi_Snackbar.re file and post it here? Thanks