feat(FontSearch): create FontSearch component with SearchBar and FontList with list virtualization
This commit is contained in:
17
src/features/FetchFonts/ui/FontSearch/FontSearch.svelte
Normal file
17
src/features/FetchFonts/ui/FontSearch/FontSearch.svelte
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { fontCollection } from '$entities/Font';
|
||||||
|
import FontList from '$entities/Font/ui/FontList/FontList.svelte';
|
||||||
|
import SearchBar from '$shared/ui/SearchBar/SearchBar.svelte';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
id = 'font-search',
|
||||||
|
}: Props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<SearchBar class="w-full" bind:value={fontCollection.searchQuery} id={id}>
|
||||||
|
<FontList />
|
||||||
|
</SearchBar>
|
||||||
Reference in New Issue
Block a user