feat(Skeleton): create skeleton component and integrate it into FontVirtualList
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user