notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
635 stars 55 forks source link

[FEAT] - Global color settings for Reports #70

Closed artrz closed 1 year ago

artrz commented 1 year ago

Is your feature request related to a problem? Please describe.

To define some Report settings one needs to add the setting inside an object referring to the report type even though the call defines that explicitly, e.g.:

Report.failure('Title', 'Message', 'OK', {
    backgroundColor: '#283240',
    failure: {
        titleColor: '#cccccc',
        messageColor: '#ffffff',
        backOverlayColor: 'rgba(0, 0, 0, 0.5)',
    }
})

I guess this has to do with the way default settings are set when using Notify.init but even in that case it may be useful to be able to define a general default color.

Describe the solution you'd like

Do not require the inner object, e.g.:

{
    backgroundColor: '#283240',
    titleColor: '#cccccc',
    messageColor: '#ffffff',
    backOverlayColor: 'rgba(0, 0, 0, 0.5)',
}

Thanks for this useful package.

furcan commented 1 year ago

Hello @arturock,

I am planning to rewrite this library from scratch with modern technologies.

I will take your expectation as a note for that version (v4), and I am closing this ticket.

Thank you, Furkan