Skip to content

Commit 4048fd1

Browse files
committed
add export button (that does nothing right now)
1 parent 11b7dfc commit 4048fd1

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ <h2>Datapack Toolkit Web (indev)</h2>
2929
<span class="file-custom"></span>
3030
</label>
3131
<div id="datapack-display"></div>
32+
<button type="button" id="export-button">Export (test)</button>
3233
</div>
3334

3435
<template id="datapack-template">

src/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,10 @@ function sanitizeHtml(unsafe: string): string {
9494
div.innerText = unsafe;
9595
return div.innerHTML;
9696
}
97+
98+
const exportButtonElement = document.getElementById("export-button")!;
99+
exportButtonElement.addEventListener("click", exportButtonClicked, { passive: true });
100+
101+
function exportButtonClicked() {
102+
console.log("Export button clicked")
103+
}

style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,14 @@ a:visited {
187187
color: inherit;
188188
font-family: inherit;
189189
}
190+
191+
button {
192+
border: 2px;
193+
border-color: var(--background-below);
194+
border-style: solid;
195+
background-color: var(--background-above);
196+
font: inherit;
197+
color: inherit;
198+
padding-bottom: 0.5em;
199+
padding-top: 0.5em;
200+
}

0 commit comments

Comments
 (0)