Skip to content

Commit 09be5a5

Browse files
committed
💣 Removed Modal Maker dep
1 parent d84b89b commit 09be5a5

File tree

2 files changed

+5
-66
lines changed

2 files changed

+5
-66
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"@codewithkyle/supercomponent",
6262
"@codewithkyle/router",
6363
"@codewithkyle/messaging",
64-
"@codewithkyle/modal-maker",
6564
"@codewithkyle/pubsub",
6665
"@codewithkyle/uuid",
6766
"tooltipper",
@@ -78,7 +77,6 @@
7877
"devDependencies": {
7978
"@codewithkyle/asset-manager": "1.x",
8079
"@codewithkyle/messaging": "1.x",
81-
"@codewithkyle/modal-maker": "1.x",
8280
"@codewithkyle/notifyjs": "3.x",
8381
"@codewithkyle/pubsub": "1.x",
8482
"@codewithkyle/router": "1.x",
@@ -109,7 +107,6 @@
109107
"typescript": "^4.5.4"
110108
},
111109
"peerDependencies": {
112-
"@codewithkyle/modal-maker": "1.x",
113110
"@codewithkyle/notifyjs": "3.x",
114111
"@codewithkyle/pubsub": "1.x",
115112
"@codewithkyle/supercomponent": "1.x",
Lines changed: 5 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,8 @@
11
<div class="w-full text-center">
2-
<button sfx="button" kind="solid" color="primary" class="m-0.5 bttn js-bttn-general">Passive</button>
3-
<button sfx="button" kind="solid" color="primary" class="m-0.5 bttn js-bttn-warn">Confirm</button>
4-
<button sfx="button" kind="solid" color="primary" class="m-0.5 bttn js-bttn-confirm-danger">Confirm Danger</button>
5-
<button sfx="button" kind="solid" color="primary" class="m-0.5 bttn js-bttn-danger">Form</button>
6-
<button sfx="button" kind="solid" color="primary" class="m-0.5 bttn js-bttn-success">Raw Data</button>
7-
<script type="module">
8-
import { passive, confirm, form, raw } from "/js/modal-maker.js";
9-
document.body.querySelector(".js-bttn-general").addEventListener("click", () => {
10-
passive({
11-
heading: "Example Modal",
12-
message: "This is an example passive modal.",
13-
});
14-
});
15-
document.body.querySelector(".js-bttn-warn").addEventListener("click", () => {
16-
confirm({
17-
heading: "Example Modal",
18-
message: "This is an example confirm modal.",
19-
})
20-
.then(() => {
21-
console.log("Confirmed");
22-
})
23-
.catch(() => {
24-
console.log("Canceled");
25-
});
26-
});
27-
document.body.querySelector(".js-bttn-confirm-danger").addEventListener("click", () => {
28-
confirm({
29-
heading: "Example Modal",
30-
message: "This is an example danger confirm modal.",
31-
dangerous: true,
32-
confirmLabel: "delete account",
33-
size: "medium",
34-
})
35-
.then(() => {
36-
console.log("Confirmed");
37-
})
38-
.catch(() => {
39-
console.log("Canceled");
40-
});
41-
});
42-
document.body.querySelector(".js-bttn-danger").addEventListener("click", () => {
43-
const formEl = document.createElement("form");
44-
formEl.innerHTML = `<input type="text" placeholder="Your name" name="fullName">`;
45-
form({
46-
form: formEl,
47-
})
48-
.then((data) => {
49-
console.log(data.get("fullName"));
50-
})
51-
.catch(() => {
52-
console.log("Form rejected");
53-
});
54-
});
55-
document.body.querySelector(".js-bttn-success").addEventListener("click", () => {
56-
raw({
57-
heading: "Waffles",
58-
message: "They're better than pancakes. Don't @ me.",
59-
el: `<img class="w-full ar-16:9" src="https://images.unsplash.com/photo-1616709620730-0058222c8389?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" alt="waffles on white ceramic plate">`,
60-
size: "large",
61-
});
62-
});
63-
</script>
2+
<button sfx="button" kind="solid" color="grey" class="m-0.5 bttn js-bttn-general">Passive</button>
3+
<button sfx="button" kind="solid" color="grey" class="m-0.5 bttn js-bttn-warn">Confirm</button>
4+
<button sfx="button" kind="solid" color="grey" class="m-0.5 bttn js-bttn-confirm-danger">Confirm Danger</button>
5+
<button sfx="button" kind="solid" color="grey" class="m-0.5 bttn js-bttn-danger">General Actions</button>
6+
<script type="module"></script>
647
</div>
65-
<link href="/css/modals.css" rel="stylesheet" />
668
<link href="/css/button.css" rel="stylesheet" />

0 commit comments

Comments
 (0)