feat(proxyFonts): add fetchFontsById function that fetches batch of fonts
This commit is contained in:
@@ -9,7 +9,8 @@ import {
|
||||
FontVirtualList,
|
||||
unifiedFontStore,
|
||||
} from '$entities/Font';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import { displayedFontsStore } from '$features/DisplayFont';
|
||||
import FontSampler from '$features/DisplayFont/ui/FontSampler/FontSampler.svelte';
|
||||
|
||||
/**
|
||||
* Load more fonts by moving to the next page
|
||||
@@ -57,8 +58,11 @@ const displayRange = $derived.by(() => {
|
||||
items={unifiedFontStore.fonts}
|
||||
total={unifiedFontStore.pagination.total}
|
||||
onNearBottom={handleNearBottom}
|
||||
itemHeight={280}
|
||||
>
|
||||
{#snippet children({ item: font, isVisible, proximity })}
|
||||
<FontListItem {font} {isVisible} {proximity} />
|
||||
{#snippet children({ item: font, isVisible, proximity, index })}
|
||||
<FontListItem {font} {isVisible} {proximity}>
|
||||
<FontSampler font={font} bind:text={displayedFontsStore.text} index={index} />
|
||||
</FontListItem>
|
||||
{/snippet}
|
||||
</FontVirtualList>
|
||||
|
||||
Reference in New Issue
Block a user