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

[FEAT] - Confirm to be selected from a dropdown #85

Closed shanpuzzo closed 3 months ago

shanpuzzo commented 3 months ago

Hello and thanks for this beautiful library. I have one question, I see that confirm.prompt asks the user a text string and I use it wherever needed; however, i'd like to have the possibility to insert a select box to have the user select from the given options. Would that be possible? Thanks in advance

furcan commented 3 months ago

Hello, you are welcome.

You have only one solution for this request:

Notiflix.Confirm.show(
  'Title',
  '<h1>HTML</h1>',
  'Yes',
  'No',
  function okCb() {
    alert('Yes');
  },
  function cancelCb() {
    alert('No');
  },
  {
    plainText: false,
  },
);

Thank you, Furkan