SimpleAlert lets you create highly customizable SweetAlert modals that show information.
| SimplestAlert ->
let alert = SimpleAlert("Simple but sweet")
state, SweetAlert.Run(alert)
| SimpleAlertWithTitle ->
let alert = SimpleAlert("Is that still a thing?").Title("The Internet")
state, SweetAlert.Run(alert)
| SuccessAlert ->
let successAlert =
SimpleAlert("Your account has been succesfully created!")
.Title("Server")
.Type(AlertType.Success)
state, SweetAlert.Run(successAlert)
| Timeout ->
let errorAlert =
SimpleAlert("That didn't go as we expected")
.Title("We are sorry...")
.Type(AlertType.Error)
.Timeout(3000)
state, SweetAlert.Run(errorAlert)
| HideConfirm ->
let successAlert =
SimpleAlert("You have levelled up!")
.Title("Congrats")
.Type(AlertType.Success)
.ConfirmButton(false)
.Timeout(2000)
state, SweetAlert.Run(successAlert)
| WithImage ->
let alert =
SimpleAlert("Modal with a custom image.")
.Title("Sweet!")
.ImageUrl("https://unsplash.it/400/200")
.ImageHeight(200)
.ImageWidth(400)
.UseAnimation(false)
state, SweetAlert.Run(alert)
| CustomConfirmBtnText ->
let alert =
SimpleAlert("We are going to launch the missiles")
.Title("Heads up!")
.Type(AlertType.Warning)
.ConfirmButtonText("Oki doki!")
state, SweetAlert.Run(alert)