first commit

This commit is contained in:
2020-12-31 17:49:54 +01:00
commit 2240985aa1
120 changed files with 11574 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
<script lang="ts">
import { createEventDispatcher } from "svelte";
import type { ModalData } from "../stores/modal";
import modalStore from "../stores/modal";
export let open: ModalData = {name: "none"};
export let disabled: boolean = false;
export let compact: boolean = false;
const dispatch = createEventDispatcher();
function handleClick() {
dispatch("click", {open});
if (open.name !== "none") {
modalStore.set(open);
}
}
</script>
<div class="boi" class:disabled class:compact on:click={handleClick}><slot></slot></div>
<style>
div.boi {
border: 6px dashed;
padding: 0.5em;
margin: 1em 0.5ch;
text-align: center;
color: #777;
border-color: #333;
cursor: pointer;
border-bottom-right-radius: 0.25em;
font-size: 2em;
-webkit-user-select: none;
-moz-user-select: none;
}
div.boi:hover {
color: #AAA;
border-color: #444;
}
div.boi.disabled {
color: #333;
border-color: #222;
cursor: wait;
}
div.boi.compact {
margin: 0;
border-width: 4px;
padding: 0.25em;
}
</style>