Open History to see the last commit
1import { splitProps } from 'solid-js'
2import type { JSX } from 'solid-js'
3import { cn } from '@/utils'
4β
5type SkeletonProps = JSX.HTMLElementTags['div']
6β
7/**
8 * A placeholder block that indicates loading content.
9 *
10 * @example
11 * ```tsx
12 * <Skeleton class="h-4 w-40" />
13 * ```
14 */
15function Skeleton(props: SkeletonProps) {
16 const [local, others] = splitProps(props, ['class'])
17β
18 return (
19 <div
20 data-slot="skeleton"
21 class={cn('animate-pulse rounded-md bg-muted', local.class)}
22 {...others}
23 />
24 )
25}
26β
27export { Skeleton }