f3oall / awesome-notifications

Lightweight JavaScript Notifications Library
https://f3oall.github.io/awesome-notifications/
MIT License
292 stars 40 forks source link

Ability to Change Confirmation Color per instance? #18

Closed SeoRoman closed 5 years ago

SeoRoman commented 5 years ago

Is your feature request related to a problem? Please describe. Would like to be able to change the OK and CANCEL class colors on the fly

Describe the solution you'd like let options = { confirm: { okClass: 'green darken-4', okClass: 'red darken-4' } }

Describe alternatives you've considered SweetAlert2

Additional context Nothing more really, Not sure if this can be applied as styles, but I don't want it that way on every request...

**** REDACTED LABEL CHANGE AS I FOUND IT IN THE DOCS

f3oall commented 5 years ago

Thanks for your feedback. Unfortunately, I can't do it in way you suggested. I don't like concept of configuring styles in JS, so it won't be ever implemented in this library. Besides this your case sounds pretty special and rare, so it would be an excess load for most of users. The ones of essential basements of this library are performance and small file size, so all requested features should be really usefull to be priority over essentials.

The only alternative I can suggest is dynamic class names for popups: you will be abble to add your class name on each popup call, then config your class name in CSS. It can take a while, so don't expect the quick implementation.

For now I can only suggest you to write your own wrapper over this library to fit your needs.

PS. If you like dynamic class names, please create a separate task for this.