Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

781 B
Raw Blame
"use client";

import { useRemocnTheme } from "@/lib/remocn-ui";
import { SkeletonBlock } from "@/registry/remocn-ui/skeleton-block";

export interface SkeletonBlockPreviewProps {
  width?: number;
  height?: number;
  radius?: number;
  speed?: number;
}

export function SkeletonBlockPreview({
  width = 240,
  height = 20,
  radius = 6,
  speed,
}: SkeletonBlockPreviewProps) {
  const theme = useRemocnTheme();

  return (
    <div
      style={{
        position: "absolute",
        inset: 0,
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
        background: theme.background,
      }}
    >
      <SkeletonBlock
        width={width}
        height={height}
        radius={radius}
        speed={speed}
      />
    </div>
  );
}