feat(FontView): integrate FontView into FontList
This commit is contained in:
@@ -5,23 +5,27 @@
|
|||||||
- Uses unifiedFontStore from context for data, but can accept explicit fonts via props.
|
- Uses unifiedFontStore from context for data, but can accept explicit fonts via props.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { fontshareStore } from '$entities/Font/model/store/fontshareStore.svelte';
|
import FontView from '$features/ShowFont/ui/FontView.svelte';
|
||||||
import {
|
import {
|
||||||
Content as ItemContent,
|
Content as ItemContent,
|
||||||
Root as ItemRoot,
|
Root as ItemRoot,
|
||||||
Title as ItemTitle,
|
Title as ItemTitle,
|
||||||
} from '$shared/shadcn/ui/item';
|
} from '$shared/shadcn/ui/item';
|
||||||
import { VirtualList } from '$shared/ui';
|
import { VirtualList } from '$shared/ui';
|
||||||
|
import { fontshareStore } from '../../model';
|
||||||
|
|
||||||
|
$inspect(fontshareStore.fonts);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<VirtualList items={fontshareStore.fonts}>
|
<VirtualList items={fontshareStore.fonts}>
|
||||||
{#snippet children({ item: font })}
|
{#snippet children({ item: font })}
|
||||||
<ItemRoot>
|
<ItemRoot>
|
||||||
<ItemContent>
|
<ItemContent>
|
||||||
<ItemTitle>{font.name}</ItemTitle>
|
<!-- <ItemTitle></ItemTitle> -->
|
||||||
<span class="text-xs text-muted-foreground">
|
<span class="text-xs text-muted-foreground">
|
||||||
{font.category} • {font.provider}
|
{font.provider} • {font.category}
|
||||||
</span>
|
</span>
|
||||||
|
<FontView id={font.id} slug={font.id} name={font.name}>{font.name}</FontView>
|
||||||
</ItemContent>
|
</ItemContent>
|
||||||
</ItemRoot>
|
</ItemRoot>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|||||||
Reference in New Issue
Block a user