Disable interaction, read only checkboxes

This commit is contained in:
space-nuko
2023-04-07 17:53:48 -05:00
parent 451e48352b
commit 838b3ce17b
7 changed files with 95 additions and 17 deletions

13
src/lib/utils.ts Normal file
View File

@@ -0,0 +1,13 @@
export function download(filename: string, text: string, type: string = "text/plain") {
const blob = new Blob([text], { type: type });
const url = URL.createObjectURL(blob);
const a = document.createElement('a')
a.href = url
a.download = filename
document.body.appendChild(a)
a.click()
setTimeout(function() {
a.remove();
window.URL.revokeObjectURL(url);
}, 0);
}