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

MatSnackBar Theme missing #72

Closed
elucidsoft opened this issue Mar 10, 2018 · 2 comments
Closed

MatSnackBar Theme missing #72

elucidsoft opened this issue Mar 10, 2018 · 2 comments

Comments

@elucidsoft
Copy link

Also noticed that there is no theme applied to SnackBars when used.

@tomastrajan
Copy link
Owner

Hey @elucidsoft !

I added example on how to style todos notification snack bar...

The gist of it is that it is an overlay component (similar to menu popup or dialog) so the popup part ( the notification itself ) is added to the end of the DOM tree just before closing </body> tag. This means that the layout doesn't belong to the todos component itself and has to be styled using global styles in todos.component.scss-theme.scss with global css class selector .todos-notification-overlay which was passed in configuration of the snack-bar.

Hope that helps!

That being said, I consider snack-bar pretty lacking in terms of customization and would be in favor of using custom notification service ( in CoreModule ) and corresponding NotificationComponent which will implement stuff like severity (eg info, warn, error, success ) and more complex action handling...

Cheers!

@elucidsoft
Copy link
Author

I would also be in favor of such a component to replace snackbar...

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