flicker-alerts 1.0.24 → 1.0.25
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.js +1 -13
- package/package.json +2 -2
- package/style.css +7 -0
package/index.js
CHANGED
@@ -1,18 +1,6 @@
|
|
1
|
-
// Adicionando os links para o Bootstrap e Font Awesome dinamicamente
|
2
|
-
function addCSSLink(href) {
|
3
|
-
const link = document.createElement('link');
|
4
|
-
link.rel = 'stylesheet';
|
5
|
-
link.href = href;
|
6
|
-
document.head.appendChild(link);
|
7
|
-
}
|
8
|
-
|
9
|
-
// Adicionar os arquivos CSS de forma dinâmica
|
10
|
-
addCSSLink('https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css');
|
11
|
-
addCSSLink('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
|
12
|
-
|
13
|
-
// Agora, você pode continuar com o restante do código
|
14
1
|
import './style.css'; // Certifique-se de usar o caminho certo aqui
|
15
2
|
|
3
|
+
|
16
4
|
const FlickerAlerts = {
|
17
5
|
showAlert: function ({ type, title, message, timer = 3000, position = 'top-right' }) {
|
18
6
|
// Verifique se está no ambiente do navegador (client-side) antes de tentar manipular o DOM
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "flicker-alerts",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.25",
|
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.25"
|
20
20
|
}
|
21
21
|
}
|
package/style.css
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
/* Importando o Bootstrap */
|
2
|
+
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css');
|
3
|
+
|
4
|
+
/* Importando o Font Awesome */
|
5
|
+
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
|
6
|
+
|
7
|
+
|
1
8
|
/* Estilo geral para o alerta */
|
2
9
|
.alert-custom {
|
3
10
|
display: flex;
|