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] - Add Prompt Dialog #42

Closed erropix closed 2 years ago

erropix commented 2 years ago

Is your feature request related to a problem? Please describe. Yes, the Notiflix.Confirm.ask() function doesn't allow the user to provide answers other than the defined correct answer.

Describe the solution you'd like If you can change the library to accept any value and pass it to the button callbacks, it will serve as an equivalent for the native browser prompt.

Describe alternatives you've considered The native browser prompt https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_prompt

furcan commented 2 years ago

Hi @ERROPiX ,

Thanks for the suggestion,

I will consider adding a new method (e.g. the method name could be "prompt()") to the Confirm module for this request in the next minor/major update.

Thanks, Furkan.

furcan commented 2 years ago

Hi @ERROPiX

Notiflix v3.2.0 has been released. https://github.com/notiflix/Notiflix/releases/tag/v3.2.0

You can use Notiflix.Confirm.prompt(); method for this request. Usage: https://github.com/notiflix/Notiflix#prompt

Thanks, Furkan.

erropix commented 2 years ago

Thank you so much @furcan for the quick update :)

furcan commented 2 years ago

Hi @ERROPiX ,

You are welcome 😊

Have a nice week, Furkan.