Releases: Silverethical/silverBox
Releases · Silverethical/silverBox
v1.3.1
v1.3.0
Change Logs:
Fixes
- In some cases, closing silverBox would encounter error because of the non optimal way that this matter was handled. The closing process was refactored to use a more robust and optimal process.
New Features
- Add
closeOnOverlayClick
option to determine if closing on the overlay should close the silverBox modal. - Timers now accept both number and string. If a number is provided, the time unit will be
ms
. If you need to determine the unit as well, you can pass an string like300ms
or0.3s
.
v1.2.0
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
andanimation
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();
v1.1.0
Change Logs:
Fixes
- Fix the overall HTML structure to separate header, body, and footer
- Separate silverBox border color var and place it in colors section
- Separate silverBox and inputs box shadow var in CSS
- Fix close button closing the wrong silverBox
New Features
- Add option to run a function after clicking a button (
button: { onClick: () => {} }
) - Add option to run a function after silverBox closes (
onClose: () => {}
) - Add slide animation for silverBox modals with
position
property - Add custom animation option so users can apply their own animation (
animation
) - Add the option to
title
to only accept text (title: "Title"
instead oftitle: { text: "Title" }
) - Add timer bar option which is enabled by default when using timer
- Add a custom button option
Improvements
- Remove backdrop filter for better performance
v1.0.0
- Initial release