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

Component{" "} {name} {" "} not found in registry.

) } if (type === "block") { return (
{name} {name}