feat: better components
This commit is contained in:
18
client/src/lib/ui/skeleton/skeleton.svelte
Normal file
18
client/src/lib/ui/skeleton/skeleton.svelte
Normal file
@ -0,0 +1,18 @@
|
||||
<script lang="ts">
|
||||
import type { WithElementRef, WithoutChildren } from "bits-ui";
|
||||
import type { HTMLAttributes } from "svelte/elements";
|
||||
import { cn } from "$lib/utils.js";
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
...restProps
|
||||
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();
|
||||
</script>
|
||||
|
||||
<div
|
||||
bind:this={ref}
|
||||
data-slot="skeleton"
|
||||
class={cn("bg-surface animate-pulse rounded-md", className)}
|
||||
{...restProps}
|
||||
></div>
|
Reference in New Issue
Block a user