import dynamic from "next/dynamic"; import { AiFillGithub } from "react-icons/ai"; import { SiStackblitz } from "react-icons/si"; import { examples } from "./generated/exampleComponents.gen"; import "./styles.css"; const baseGitHubURL = "https://github.com/TypeCellOS/BlockNote/tree/main/"; // const baseCodeSandboxURL = // "https://githubbox.com/TypeCellOS/BlockNote/tree/main/"; const baseStackBlitzURL = "https://www.stackblitz.com/github/TypeCellOS/BlockNote/tree/main/"; const ThemedExample = dynamic(() => import("./ThemedExample"), { ssr: false, }); export function ExampleBlock(props: { name: keyof typeof examples; path: string; children: any; }) { // const example = examplesFlattened.find((e) => e.slug === props.name); // if (!example) { // throw new Error("invalid example"); // } return (
GitHub
StackBlitz
{props.children}
); }