Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

511 B
Raw Blame
import { formatDuration } from "./assetHelpers";

/** Shared duration treatment for project assets and catalog cards. */
export function MediaDurationBadge({ duration, className = "" }: {
  duration?: number | null;
  className?: string;
}) {
  const label = formatDuration(duration ?? 0);
  if (!label) return null;
  return (
    <span className={`text-[9px] font-medium leading-none px-1.5 py-[3px] rounded-sm bg-neutral-950/80 text-panel-text-2 tabular-nums ${className}`}>
      {label}
    </span>
  );
}