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

Using deprecated material-ui syntax 'theme.spacing.unit' #169

Closed
ryan-gray opened this issue Sep 23, 2019 · 5 comments
Closed

Using deprecated material-ui syntax 'theme.spacing.unit' #169

ryan-gray opened this issue Sep 23, 2019 · 5 comments

Comments

@ryan-gray
Copy link

When using using enqueueSnackbar(), there is an error thrown in the console as show below.
Screen Shot 2019-09-23 at 4 10 48 PM

This should be updated to use theme.spacing(y) instead of theme.spacing.unit * y, as described in the error message

Expected Behavior

No error is thrown from notistack when enqueuing a snackbar.

Current Behavior

An error is thrown when enqueuing a snackbar related to deprecated usage of material-ui's spacing API.

Steps to Reproduce

Link: https://codesandbox.io/s/notistack-simple-example-eo4ur?fontsize=14

  1. Open developer tools
  2. Click any of the buttons to add a snackbar
  3. Notice error in console

Context

When material-ui removes this API, it could cause a breaking change for notistack.

Your Environment

Tech Version
notistack v0.9.1
react v16.9.0
react-dom v16.9.0
Chrome v77
@material-ui/core 4.4.3
@iamhosseindhv
Copy link
Owner

Thanks for reporting @ryan-gray. fix has been released

@ryan-gray
Copy link
Author

Great, thank you!

@ryan-gray
Copy link
Author

Which release is that? I only see 0.9.1.

@iamhosseindhv
Copy link
Owner

Its v0.9.2

@ryan-gray
Copy link
Author

I'm still reproducing it in the code sandbox with 0.9.2:
https://codesandbox.io/s/notistack-simple-example-eo4ur?fontsize=14

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