diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-18 18:11:53 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-18 18:11:53 +0800 |
| commit | adcf80b6e7e2c1a6418f06774178d6fd699bbfce (patch) | |
| tree | 21ad3b7fcdea1ec0f99292cf68fe93a772870c9c /frontend/src/lib/components/ui/skeleton/skeleton.svelte | |
| parent | 1e1a7eeb58bb23d60b72b0b9ed780d43c2681ac6 (diff) | |
| download | strategy-lab-adcf80b6e7e2c1a6418f06774178d6fd699bbfce.tar.gz | |
[新增功能] shadcn 新增 skeleton / textarea 组件(三态模板与表单组件底座)
Diffstat (limited to 'frontend/src/lib/components/ui/skeleton/skeleton.svelte')
| -rw-r--r-- | frontend/src/lib/components/ui/skeleton/skeleton.svelte | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/src/lib/components/ui/skeleton/skeleton.svelte b/frontend/src/lib/components/ui/skeleton/skeleton.svelte new file mode 100644 index 0000000..1a940ee --- /dev/null +++ b/frontend/src/lib/components/ui/skeleton/skeleton.svelte @@ -0,0 +1,17 @@ +<script lang="ts"> + import { cn, type WithElementRef, type WithoutChildren } from "$lib/utils.js"; + import type { HTMLAttributes } from "svelte/elements"; + + let { + ref = $bindable(null), + class: className, + ...restProps + }: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props(); +</script> + +<div + bind:this={ref} + data-slot="skeleton" + class={cn("bg-muted rounded-md animate-pulse", className)} + {...restProps} +></div> |
