snap-alert-js
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "snap-alert-js", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "SnapAlert is a lightweight Javascript plugin that provides customizable and user-friendly alert notifications , Easily display alerts, confirmations, and prompts in your applications with simple methods and flexible options.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://zain.picker.sd", |
@@ -60,3 +60,3 @@ # SnapAlert for Javascript | ||
```javascript | ||
SnapAlert.alert('Alert Title', 'This is a basic alert.'); | ||
SnapAlert().alert('Alert Title', 'This is a basic alert.'); | ||
``` | ||
@@ -67,3 +67,3 @@ | ||
```javascript | ||
SnapAlert.success('Success', 'Your operation was successful!'); | ||
SnapAlert().success('Success', 'Your operation was successful!'); | ||
``` | ||
@@ -74,3 +74,3 @@ | ||
```javascript | ||
SnapAlert.info('Info', 'Be Notice!'); | ||
SnapAlert().info('Info', 'Be Notice!'); | ||
``` | ||
@@ -82,3 +82,3 @@ | ||
```javascript | ||
SnapAlert.error('Error', 'Something went wrong.'); | ||
SnapAlert().error('Error', 'Something went wrong.'); | ||
``` | ||
@@ -89,3 +89,3 @@ | ||
```javascript | ||
SnapAlert.warning('Are you sure?', 'This action cannot be undone.', { | ||
SnapAlert().warning('Are you sure?', 'This action cannot be undone.', { | ||
enableConfirm: true, | ||
@@ -107,3 +107,3 @@ enableCancel: true, | ||
```javascript | ||
SnapAlert.info('Information', 'This is an info alert.', { | ||
SnapAlert().info('Information', 'This is an info alert.', { | ||
position: 'top right', | ||
@@ -121,3 +121,3 @@ duration: 5000, | ||
```javascript | ||
SnapAlert.html(`<img src="https://placehold.co/600x400" />`, { | ||
SnapAlert().html(`<img src="https://placehold.co/600x400" />`, { | ||
position: 'top right', | ||
@@ -135,3 +135,3 @@ duration: 5000, | ||
```javascript | ||
SnapAlert.SnapOptions({ | ||
SnapAlert().SnapOptions({ | ||
duration: 5000, | ||
@@ -149,3 +149,3 @@ isDark: true, | ||
// Set global options | ||
SnapAlert.SnapOptions({ | ||
SnapAlert().SnapOptions({ | ||
duration: 4000, | ||
@@ -156,4 +156,4 @@ isDark: false, | ||
// Now all alerts will have these default settings | ||
SnapAlert.success('Global Success', 'This alert will use global options.'); | ||
SnapAlert.error('Global Error', 'This alert will also use global options.'); | ||
SnapAlert().success('Global Success', 'This alert will use global options.'); | ||
SnapAlert().error('Global Error', 'This alert will also use global options.'); | ||
``` | ||
@@ -167,3 +167,3 @@ | ||
```javascript | ||
SnapAlert.clearAll(); | ||
SnapAlert().clearAll(); | ||
``` | ||
@@ -170,0 +170,0 @@ |
37190