A small javascript package for creating beautiful alert (IOS style)
install using npm:
npm install alertrict
using npm:
import alertrict from "alertrict";
<link rel="stylesheet" href="dist/css/alertrict.min.css" />
<script src="dist/js/alertrict.min.js"></script>
alertrict(options);
options are object
key | type | default |
---|---|---|
title | string |
|
text | string |
|
confirmText | string |
Continue |
showCancel | boolean |
FALSE |
cancelText | string |
Cancel |
animation | boolean |
TRUE |
destructive | boolean |
FALSE |
alertrict({
title: "Alert!",
text: "Are you sure you want to quit?",
showCancel: true,
}).then((result){
if(result.isConfirmed){
// doing something
}
});