notistack overrides default mui theme settings

Created on 18 Dec 2019  路  1Comment  路  Source: iamhosseindhv/notistack

Hi all,

Thanks for this great library - it's very helpful! :-)

Recently I've noticed that when error snackbar appeared one of my icons (material-ui or mdi icon based on SvgIcon) changed color to red. When snackbar disappeared it reverted to original color.

Seems like notistack somehow overrides default material-ui styles. I was able to track it down and it was enough to remove https://github.com/iamhosseindhv/notistack/blob/master/src/utils/constants.js#L40 (root: {}).

I'm not sure if it affects notistack anyhow else thought so I haven't made PR with this change. It would be great if someone who knows the project better can confirm if it's okay.

Thanks,
Daniel

Most helpful comment

@Sajam Thanks for opening this issue.

Please make sure SnackbarProvider is a children of MaterialThemeProvider. If the problem persisted, please create a reproduction and I'll look into it. Thanks.

Screenshot 2019-12-21 at 14 33 01

>All comments

@Sajam Thanks for opening this issue.

Please make sure SnackbarProvider is a children of MaterialThemeProvider. If the problem persisted, please create a reproduction and I'll look into it. Thanks.

Screenshot 2019-12-21 at 14 33 01

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ksavery picture ksavery  路  3Comments

kubalobo picture kubalobo  路  5Comments

james-cordeiro picture james-cordeiro  路  6Comments

VincentLanglet picture VincentLanglet  路  5Comments

nebojsanb picture nebojsanb  路  3Comments