1.0.0 • Published 3 years ago

alertrict v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Alertrict

A small javascript package for creating beautiful alert (IOS style)

Installation

install using npm:

npm install alertrict

Import

using npm:

import alertrict from "alertrict";

or

<link rel="stylesheet" href="dist/css/alertrict.min.css" />
<script src="dist/js/alertrict.min.js"></script>

Usage

alertrict(options);

Options

options are object

keytypedefault
titlestring
textstring
confirmTextstringContinue
showCancelbooleanFALSE
cancelTextstringCancel
animationbooleanTRUE
destructivebooleanFALSE

Example

alertrict({
  title: "Alert!",
  text: "Are you sure you want to quit?",
  showCancel: true,
}).then((result){
    if(result.isConfirmed){
        // doing something
    }
});

Documentation

rifkiard.github.io/alertrict