22 lines · 738 B
import type { DemoKey } from "~/lib/marketing/features";
import { AiDemo } from "./demos/AiDemo";
import { EditorDemo } from "./demos/EditorDemo";
import { HostingDemo } from "./demos/HostingDemo";
import { ReviewDemo } from "./demos/ReviewDemo";
import { SecurityDemo } from "./demos/SecurityDemo";
import { WorkflowDemo } from "./demos/WorkflowDemo";

const DEMOS: Record<DemoKey, (props: { className?: string }) => React.ReactNode> = {
  review: ReviewDemo,
  workflow: WorkflowDemo,
  ai: AiDemo,
  editor: EditorDemo,
  security: SecurityDemo,
  hosting: HostingDemo,
};

export function FeatureDemo({ demo, className }: { demo: DemoKey; className?: string }) {
  const Demo = DEMOS[demo];
  return <Demo className={className} />;
}