-
Notifications
You must be signed in to change notification settings - Fork 97
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
Change growl default style classes (Issue #101) #121
Conversation
Update my fork with latest commits
Custom directive properties to change message style classes. This commit maybe will solve Issue JanStevens#101.
Allow custom style classes related to severities to be defined globally.
Made style class available globally
Use custom style class or global
Allow changing growl default style classes globally (Issue JanStevens#101)
I'm still trying to create a sample in Plunker to demonstrate the changes. Maybe I'll have to change the angular-growl's CSS and the default template in growlDirective.js. |
Allow customization of overall growl message style and which icon to use for each severity. - styleClasses: defines the overall style of growl messages for each severity. - iconClasses: defines the icons for each severity.
Allow customization of overall growl message style and which icon to use for each severity. - severityNames: severity names that will be styled. - styleClasses: defines the overall style of growl messages for each severity. - iconClasses: defines the icons for each severity.
Objective: allow any severity names (different of "success", "info", "warning", "error"), sent from server or customized by the user, to be styled by the component.
- severity names customization - default severity customization
Allow custom severity names
I'll postpone this pull request until I have some reasonable/stable code to commit and samples to demonstrate the new features. |
Motivated by the Issue #101, I implemented some basic changes to angular-growl-2 to allow users to define another set of style classes for all growl tags and also for a specific growl.
Global config object should use the format below (samples are using FontAwesome styles just to relate to the issue, but could be used any style class names from any similar icon library):
All styleClasses attributes are optional and if not defined will fallback to the actual default value.
If a user want to suppress an icon an empty string should be passed as the attribute value for the specific severity.
A specific growl tag could use custom style classes adding some attributes to it, like this:
<growl ... success-class="fa fa-check" info-class="fa fa-info" warning-class="fa fa-exclamation" error-class="fa fa-times" danger-class="fa fa-times">...</growl>
I'll provide a Plunker with samples for these situations.
Hope it will help.