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
647 stars 55 forks source link

SOLVED: Features request #22

Closed SebastianStavar closed 4 years ago

SebastianStavar commented 4 years ago

Hi,

First, I've spent a little bit of time trying to find other libraries because of the missing features I will mention below and yours never came up in any search. And for the life of me I can't figure out why, since from the few I looked at, it is by far the best. Easiest to use, to configure and with tones of options. And looks great as well.

That being said, there are 2 things that I would love if you could add. Not sure if this is the place to ask for them but it's the best I've got.

  1. Would be awesome if the backOverlay appearance would be customizable per alert type. I would love to put it up for failures, but not for warnings for example.
  2. Can you please add center positions on the edges? I would love to have notifications left-center for example.

Thank you very much for an awesome product.

furcan commented 4 years ago

Hi @SebastianStavar

Firstly thanks for using the Notiflix, and I am really glad to hear your appreciation. Thank you.

Also, we are talking about the Notify module if I understood right.

I have been reviewed (for all browsers compatibility) your requests for the Notify module, and both of them could be done.

I noted these requests, and in the next version of Notiflix, you will able to do these.

In addition, I can not give an estimated release date for these, but please be sure these will be done as soon as possible.

Thanks.


PS: You can use the Merge function to change the backOverlay option for each Notify element to solve your first request. Yes, this is not a good approach but can solve your request temporarily.

e.g.

// Initialize the Notify module with these options.
Notiflix.Notify.Init({
    backOverlay: true,
    backOverlayColor: 'transparent',
});

// Use the Merge function to extend the Initialize function for the Notify Failure
Notiflix.Notify.Merge({
    backOverlayColor: 'red',
});
Notiflix.Notify.Failure('This is a warning.');
furcan commented 4 years ago

Hi again, @SebastianStavar

Notiflix v2.2.0 just released.

Both of your recommended features have been added to the Notiflix. You can review the changes via the link below.

Thanks.