This commit is contained in:
Chaoscaot
2023-10-01 10:04:04 +02:00
parent 7728d9e177
commit e0f2702eca
49 changed files with 2589 additions and 68 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts">
import type {Team} from "../../types/team.js";
import {brightness, colorFromTeam, lighten} from "../../util.js";
export let team: Team;
let hover = false;
</script>
<div class="rounded w-fit p-2 border-gray-600 border cursor-grab select-none m-1 flex place-items-center"
style:background-color={hover ? lighten(colorFromTeam(team)) : colorFromTeam(team)} class:text-black={brightness(colorFromTeam(team))} draggable="true"
on:dragstart
on:mouseenter={() => hover = true}
on:mouseleave={() => hover = false}>
<span>{team.name}</span>
</div>