zenno: format

This commit is contained in:
2026-07-10 15:37:29 -04:00
parent fca43e64b5
commit cae7d5b8f4
4 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
interface Props {
id: string;
items: T[];
key: (t: T) => {id: number, name: string};
key: (t: T) => { id: number; name: string };
value: T | undefined;
option?: Snippet<[T]>;
class?: ClassValue | null;
+4 -4
View File
@@ -52,14 +52,14 @@
}
const curClass = $derived(sparkClass(group?.type));
const key = (v: spark.SparkGroup) => ({id: v.spark_group, name: v.name})
const key = (v: spark.SparkGroup) => ({ id: v.spark_group, name: v.name });
</script>
<h1 class="text-4xl">Spark Explorer</h1>
<form class="mx-auto mt-8 rounded-md p-4 text-center shadow-md ring md:max-w-2xl">
<Pick id="spark" items={groups} class="w-full" {key} bind:value={group} required>
{#snippet option(g)}
<span class={['spark px-2 py-1 rounded', sparkClass(g.type)]}>{g.name}</span>
<span class={['spark rounded px-2 py-1', sparkClass(g.type)]}>{g.name}</span>
{/snippet}
</Pick>
</form>
@@ -83,9 +83,9 @@
<tbody>
{#each curDescriptions as s (s)}
<tr>
<td class="flex gap-2 p-1 text-center border border-mist-400 dark:border-mist-950">
<td class="flex gap-2 border border-mist-400 p-1 text-center dark:border-mist-950">
{#each s as n (n)}
<span class="flex-1 my-auto">{n}</span>
<span class="my-auto flex-1">{n}</span>
{/each}
</td>
</tr>