-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Anchor 'center' not working on screens under 960px #192
Comments
Thanks @jtraaraujo . ❤️ Although I'm not sure if this is explicitly specified in material design, I think it's a good design decision. |
Hi @iamhosseindhv ! Thanks for your reply! I did check on Material UI website and they don't force the Snackbar to the left in 'sm' screens (600 to 960px). Tested here: https://material-ui.com/components/snackbars/#positioned-snackbars Also, Material specifications explicitly say: So I guess if you're following Material UI's approach, the Snackbar should stay centered. Thanks! |
I also ran into this today, I think notistack should not differ in behaviour to how things work in material ui as it threw me for a while until i realised this was by design |
@piehouserat Make sure you are using the latest version. I suspect it was solved. Do you have a reproduction? |
I just installed it today, package.json shows 0.9.7 which is the latest version on npm, a reproduction of the problem can actually be produced on the notistack website by going to https://iamhosseindhv.com/notistack/demos#material-props setting the horizontal anchor origin to center and adjusting the viewport to less than 960px have added some extra jss to fix the problem for now but hopefully this can be removed soon when fixed |
Ah right, thanks for the detailed step. Well, It does sound like a small bug :). |
Hello guys, got this same problem today. It seems like the bug wasn't solved yet. Any updates? |
The problem you're facing @lucasturci is #367 which has been fixed in the latest version (1.0.6). |
Anchor 'center' should center the snackbar, but it doesn't in smaller screens.
EDIT: Screens between 600 and 960px ('sm' right?)
Expected Behavior
Center the Snackbar
Current Behavior
Stays on the left of the screen (top or bottom) - tested on Chrome and Firefox
Steps to Reproduce
Just go to the examples page: https://iamhosseindhv.com/notistack/demos#material-props and try centered snackbars (top or bottom)
First time I post a bug in GitHub so I hope it's good enough :)
Thanks
The text was updated successfully, but these errors were encountered: