/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface SkeletonProps extends Omit, "width" | "height"> { variant?: "text" | "rectangle" | "circle"; /** CSS width. */ width?: string; /** CSS height. */ height?: string; } /** * Placeholder shape shown while content loads. * * @example * */ export const Skeleton = forwardRef(({ variant = "text", width, height, className = "", ...rest }, ref) => { const effectiveWidth = width ?? (variant === "text" ? "100%" : undefined); const effectiveHeight = variant === "circle" ? effectiveWidth : height; return (