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 { interface Props {
id: string; id: string;
items: T[]; items: T[];
key: (t: T) => {id: number, name: string}; key: (t: T) => { id: number; name: string };
value: T | undefined; value: T | undefined;
option?: Snippet<[T]>; option?: Snippet<[T]>;
class?: ClassValue | null; class?: ClassValue | null;
+4 -4
View File
@@ -52,14 +52,14 @@
} }
const curClass = $derived(sparkClass(group?.type)); 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> </script>
<h1 class="text-4xl">Spark Explorer</h1> <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"> <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> <Pick id="spark" items={groups} class="w-full" {key} bind:value={group} required>
{#snippet option(g)} {#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} {/snippet}
</Pick> </Pick>
</form> </form>
@@ -83,9 +83,9 @@
<tbody> <tbody>
{#each curDescriptions as s (s)} {#each curDescriptions as s (s)}
<tr> <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)} {#each s as n (n)}
<span class="flex-1 my-auto">{n}</span> <span class="my-auto flex-1">{n}</span>
{/each} {/each}
</td> </td>
</tr> </tr>