Add search functionality with SearchBar component, update YearDashboard to filter people and gifts based on search input, and enhance GiftModal and PersonModal for better state management.

This commit is contained in:
Norbert Maciaszek
2025-11-25 23:15:56 +01:00
parent 6b50100ba7
commit 52fd699050
5 changed files with 83 additions and 12 deletions

View File

@@ -0,0 +1,20 @@
<script>
import { searchStore } from '$lib/store/search.svelte';
import { Search } from 'lucide-svelte';
import { slide } from 'svelte/transition';
let showSearch = $state(false);
</script>
<div class="flex items-center gap-2">
{#if showSearch}
<input
transition:slide={{ axis: 'x' }}
bind:value={searchStore.value}
type="text"
placeholder="Szukaj"
class="border-none rounded-xl bg-neutral-300"
/>
{/if}
<Search class="cursor-pointer" onclick={() => (showSearch = !showSearch)} />
</div>