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.

Home Page:https://notiflix.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT] - Global color settings for Reports

artrz opened this issue · comments

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.

commented

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