Files
frontend-svelte/src/widgets/ComparisonView/ui/Search/Search.svelte
T

31 lines
761 B
Svelte
Raw Normal View History

2026-04-17 12:14:55 +03:00
<!--
Component: Search
Typeface search input for the comparison view.
Updates the global filterManager query to filter the font list.
-->
<script lang="ts">
2026-05-23 16:59:59 +03:00
import { fontStore } from '$entities/Font';
import {
filterManager,
mapManagerToParams,
} from '$features/GetFonts';
import { SearchBar } from '$shared/ui';
2026-05-23 16:59:59 +03:00
import { untrack } from 'svelte';
$effect(() => {
const params = mapManagerToParams(filterManager);
untrack(() => fontStore.setParams(params));
});
</script>
<div class="p-6 border-b border-black/5">
<SearchBar
id="font-search"
class="w-full"
placeholder="Typeface Search"
2026-04-19 19:14:49 +03:00
aria-label="Search typefaces"
bind:value={filterManager.queryValue}
fullWidth
/>
</div>