diff --git a/src/lib/components/ui/chip-group/chip-group.svelte b/src/lib/components/ui/chip-group/chip-group.svelte new file mode 100644 index 0000000..baf6c96 --- /dev/null +++ b/src/lib/components/ui/chip-group/chip-group.svelte @@ -0,0 +1,45 @@ + + +
+ {#if label} + {label} + {/if} +
+ {#each items as item} + + {/each} +
+
diff --git a/src/lib/components/ui/chip-group/index.ts b/src/lib/components/ui/chip-group/index.ts new file mode 100644 index 0000000..678a3f7 --- /dev/null +++ b/src/lib/components/ui/chip-group/index.ts @@ -0,0 +1 @@ +export { default as ChipGroup } from "./chip-group.svelte"; diff --git a/src/routes/songs/+page.svelte b/src/routes/songs/+page.svelte index 1aae94b..cc52ed9 100644 --- a/src/routes/songs/+page.svelte +++ b/src/routes/songs/+page.svelte @@ -5,6 +5,7 @@ import { invalidate } from "$app/navigation"; import SongEntry from "$lib/components/SongEntry.svelte"; import { Button } from "$lib/components/ui/button"; + import { ChipGroup } from "$lib/components/ui/chip-group"; import { Input } from "$lib/components/ui/input"; import { Label } from "$lib/components/ui/label"; import { db as clientDb } from "$lib/db/client-db"; @@ -119,25 +120,14 @@ /> -
-
- Song Type -
- {#each Object.keys(AmqSongLinkTypeMap) as type} - - {/each} -
-
-
+ ({ + label: type, + value: AmqSongLinkTypeMap[type as keyof typeof AmqSongLinkTypeMap], + }))} + bind:value={params.type} + />