1.2.5 • Published 1 year ago

fast-alert v1.2.5

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

fast-alert

A lightweight JavaScript library for displaying customizable alerts in the browser.

Installation

Install the package using npm:

npm install fast-alert


### usage 


import showAlert from "fast-alert";

// Example with default values default width depends content
showAlert('This is a red alert at the top');

// Example with custom values
showAlert('This is a red alert at the top', '100%', 'white', 'red', 'top', 1000 )


/**
 * Displays an alert with the specified message, color, position, and duration.
 *
 * @param {string} message - The message to be displayed in the alert.
 * @param {string} width - alert div width default is auto
 * @param {string} textColor - The color of the alert text.
 * @param {string} backgroundColor - The background  of the alert box.
 * @param {string} position - The position of the alert. Can be one of 'top', 'bottom', 'center';
 * @param {number} duration - The duration of the alert in milliseconds.
 */
showAlert(message, width, textColor, backgroundColor, position, duration)
1.2.5

1 year ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago