You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Notification.show method is very limited and I always have to add a custom Notification class with methods like success, error, warning etc.
And there I do
Notification notification = new Notification("The requested employee was not found", 3000, Notification.Position.TOP_END);
notification.addThemeVariants(NotificationVariant.LUMO_ERROR);
notification.open();
It would be great if the Notification class could already have those methods.
The text was updated successfully, but these errors were encountered:
Notification are a good example for a builder pattern IMHO. I've created my own NotificationBuilder for our applications where I can specificy globally (based on type (success / error and so on)) timeout, styles and "closeability" so that only the type and content has to be specified.
Likewise, I had created a Builder for notifications, but in the end, I created another simple one for the ConfirmDialog with pattern builder as well...
I have created something not so perfect, but it works for the moment...
The Notification.show method is very limited and I always have to add a custom Notification class with methods like success, error, warning etc.
And there I do
It would be great if the Notification class could already have those methods.
The text was updated successfully, but these errors were encountered: