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

Custom notification CSS class #3

Closed
Clashsoft opened this issue May 25, 2021 · 1 comment
Closed

Custom notification CSS class #3

Clashsoft opened this issue May 25, 2021 · 1 comment

Comments

@Clashsoft
Copy link

Currently, the CSS class for generated <div>s is always one of notification_{info,success,warning,error}. It would be nice to allow a custom mapping, e.g. for Bootstrap classes: alert alert-{info,success,warning,danger}. Perhaps with a mapping function:

Extension notificationExtension = NotificationsExtension.create().withClassMapper((Notification n) -> {
  return n == Notification.ERROR ? "alert alert-danger" : "alert alert-" + n.name().toLowerCase();
};
@McFoggy
Copy link
Owner

McFoggy commented Jun 16, 2021

Added in new 1.1.0.

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