"use client" import * as React from "react" import { cn } from "@/lib/utils" import { Icons } from "@/components/icons" import { registry } from "@/fancy/index" interface ExplanationDemoProps extends React.HTMLAttributes { name: string extractClassname?: boolean extractedClassNames?: string align?: "center" | "start" | "end" framerLink?: string description?: string } export function ExplanationDemo({ name, children, className, framerLink, extractClassname, extractedClassNames, align = "center", description, ...props }: ExplanationDemoProps) { const [previewKey, setPreviewKey] = React.useState(0) const Preview = React.useMemo(() => { const Component = registry[name]?.component if (!Component) { return (

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

) } return }, [name]) return (
Loading...
} > {Preview}
) }