feat(Skeleton): create skeleton component and integrate it into FontVirtualList

This commit is contained in:
Ilia Mashkov
2026-02-06 11:53:59 +03:00
parent 63888e510c
commit b9eccbf627
3 changed files with 132 additions and 13 deletions
+27
View File
@@ -0,0 +1,27 @@
<!--
Component: Skeleton
Generic loading placeholder with shimmer animation.
-->
<script lang="ts">
import { cn } from '$shared/shadcn/utils/shadcn-utils';
import type { HTMLAttributes } from 'svelte/elements';
interface Props extends HTMLAttributes<HTMLDivElement> {
/**
* Whether to show the shimmer animation
*/
animate?: boolean;
}
let { class: className, animate = true, ...rest }: Props = $props();
</script>
<div
class={cn(
'rounded-md bg-gray-100/50 backdrop-blur-sm',
animate && 'animate-pulse',
className,
)}
{...rest}
>
</div>