Change Logs:
Fixes
- Fix
animation option only applying the animation config to the first silverBox.
New Features
- Add option to run a function before silverBox is rendered (
preOpen: () => { // Do something here }).
- Add option to run a function after silverBox is rendered (
didOpen: () => { // Do something here }).
- Add option for
html property to also accept node element (still can accept template literal).
- Add option for
timer and animation properties to receive the time values as strings too. This way the unit can be specified.
- Return
.remove() and .removeLoading() functions to be used to remove silverBox or button(s) loading animation. Example:
const myModal = silverBox({
title: "My Modal",
confirmButton: {
closeOnClick: false,
},
});
// Remove silverBox
myModal.remove();
// Remove button(s) loading animation
myModal.removeLoading();