team-1/frontend/src/lib/components/SuggestionInput.svelte

20 lines
791 B
Svelte
Raw Normal View History

2025-08-01 21:10:03 +02:00
<script lang="ts">
2025-08-02 02:12:41 +02:00
let { roomId } = $props()
let input = $state("")
async function sendSong() {
let resp = await fetch(`/api/addsong?room=${roomId}&query=${input}`, { method: "POST" })
input = ""
}
2025-08-01 21:10:03 +02:00
</script>
2025-08-02 04:34:45 +02:00
<div class="bg-lime-500 flex h-full w-full flex-row items-center gap-2 rounded border-2 border-lime-600">
<input type="text" placeholder="Song & Artist" class="font-bold outline-none text-white h-[50px] px-4 w-3/4 rounded" bind:value={input} />
<button
class="shadow-xl hover:scale-105 w-1/4 h-[40px] cursor-pointer bg-lime-600 border-lime-700 font-semibold text-white border-2 i-lucide-check rounded active:scale-90 duration-100"
onclick={sendSong}>Add</button
>
<span class="i-lucide-chevrons-left"></span>
2025-08-01 21:10:03 +02:00
</div>