blob: 5390344fa15d9ef541a75a49322557190ec3980e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<script lang="ts">
import type { ProjectStatus } from "$lib/models/projects/ProjectStatus";
import Badge from "./badge.svelte";
export let status: string | ProjectStatus;
let text = "";
let type = "default" as any;
$: switch (status) {
case "idl":
type = "tame";
text = "IDLE";
break;
case "exp":
type = "yellow";
text = "EXPIRED";
break;
case "act":
type = "green";
text = "ACTIVE";
break;
}
</script>
<Badge {text} {type} uppercase />
|