Closed beruic closed 8 years ago
Right now the easy way is to change the DOM
after execute
const customPromise = eModa[ACTION](args);
You can get the DOM element with
customPromise.element;
and you can manual swap them with jQuery
const no = customPromise.element.find('.btn-danger').removeClass('btn-danger');
const yes = customPromise.element.find('.btn-primary').removeClass('btn-primary');
no.addClass('btn-primary');
yes.addClass('btn-danger');
now you ca do: eModal.confirm({ message: 'whats up', style: ['warning', 'muted']})
I am making a confirm modal for some delete actions, and I'd like the "Yes" button to be danger, instead of the "No" button. Is this possible, or do I need to make an alert and define
buttons
instead?