@bezbeli/alert 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,18 @@
1
1
  // index.ts
2
- console.log("Hello via Bun!");
3
- var alert = (message) => {
4
- console.log(message);
2
+ var alert = ({ message, type = "info" }) => {
3
+ return `
4
+ <div class="alert alert-${type}">
5
+ <div class="alert-message">${message}</div>
6
+ <div class="alert-close">
7
+ <button class="alert-close-button">
8
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
9
+ <path d="M18 6L6 18"/>
10
+ <path d="M6 6l12 12"/>
11
+ </svg>
12
+ </button>
13
+ </div>
14
+ </div>
15
+ `;
5
16
  };
6
17
  export {
7
18
  alert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bezbeli/alert",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Alert package",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",