import Image from "next/image" import { ComponentPreviewTabs } from "@/components/component-preview-tabs" import { ComponentSource } from "@/components/component-source" import { Index } from "@/registry/__index__" import { type Style } from "@/registry/_legacy-styles" export function ComponentPreview({ name, styleName = "new-york-v4", type, className, align = "center", hideCode = false, chromeLessOnMobile = false, ...props }: React.ComponentProps<"div"> & { name: string styleName?: Style["name"] align?: "center" | "start" | "end" description?: string hideCode?: boolean type?: "block" | "component" | "example" chromeLessOnMobile?: boolean }) { const Component = Index[styleName]?.[name]?.component if (!Component) { return (
Component{" "}
{name}
{" "}
not found in registry.