flicker-alerts 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +5 -2
- package/package.json +2 -2
- package/style.css +0 -1
package/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ declare module 'flicker-alerts' {
|
|
5
5
|
title: string;
|
6
6
|
message: string;
|
7
7
|
duration?: number; // Duração do alerta (opcional)
|
8
|
-
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';
|
8
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';
|
9
9
|
}
|
10
10
|
|
11
11
|
export default class FlickerAlerts {
|
package/index.js
CHANGED
@@ -9,10 +9,13 @@ const FlickerAlerts = {
|
|
9
9
|
container = document.createElement('div');
|
10
10
|
container.id = 'alerts-container';
|
11
11
|
document.body.appendChild(container); // Adiciona o container ao body
|
12
|
+
} else {
|
13
|
+
// Limpar as classes anteriores de posição
|
14
|
+
container.className = '';
|
12
15
|
}
|
13
16
|
|
14
|
-
//
|
15
|
-
container.
|
17
|
+
// Aplica a nova classe de posição
|
18
|
+
container.classList.add(position);
|
16
19
|
|
17
20
|
// Criação do alerta
|
18
21
|
const alertBox = document.createElement('div');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "flicker-alerts",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.17",
|
4
4
|
"description": "Biblioteca para alertas animados",
|
5
5
|
"main": "index.js",
|
6
6
|
"types": "index.d.ts",
|
@@ -16,6 +16,6 @@
|
|
16
16
|
"author": "",
|
17
17
|
"license": "MIT",
|
18
18
|
"dependencies": {
|
19
|
-
"flicker-alerts": "^1.0.
|
19
|
+
"flicker-alerts": "^1.0.17"
|
20
20
|
}
|
21
21
|
}
|