Thanks to visit codestin.com
Credit goes to github.com

Skip to content

JS library with the purpose of providing success and error alert box messages for your website.

Notifications You must be signed in to change notification settings

lbert1/cute-alert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cute Alert

JS library with the purpose of providing success and error alert box messages for your website.

img

Instructions

  • Firstly clone this repo and import both "style.css" and "app.js" into your code. (JS file must be at the end of body tag)
  • In your JS file, call cuteAlert() passing the following arguments: type, title, message and buttonText. (the last one is optional)

Examples:

cuteAlert({
  type: "success",
  title: "Congratulations!",
  message: "You won the match!",
  buttonText: "Yaay!!!"
});
cuteAlert({
  type: "error",
  title: "Sorry...",
  message: "You lost the match!",
  buttonText: "OK :-("
});

cuteAlert() returns a Promise, so you can use "then" to execute an action after the modal window is closed:

cuteAlert({
  type: "error",
  title: "Sorry...",
  message: "You lost the match!",
  buttonText: "OK :-("
}).then(() => {
  location.reload();
});

Design

Dev

About

JS library with the purpose of providing success and error alert box messages for your website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 57.0%
  • JavaScript 43.0%