2.0.5 • Published 8 years ago
sweet-alert v2.0.5
sweet-alert
A beautiful replacement for JavaScript's alert
Usage
In addition, there is a global swal helper since you mostly only want one instance.
State
title = '': The main heading to displaycontent = '': Extra HTML to display below the icontype = 'warning': The icon type, can bewarning | error | success | workingbuttons = []: An array of objects representing the buttons to display, in the form of:{ text, onClick, type }.onClickis the function to be invoked on clicked (closes the dialog if none omitted) andtypeis used to make the buttonprimary(different colour).
close: Closes the dialog