import { signIn } from "next-auth/react"; import dynamic from "next/dynamic"; import { AiFillGithub } from "react-icons/ai"; import { SiStackblitz } from "react-icons/si"; import CTAButton from "../../components/pages/landing/shared/CTAButton"; import { SectionHeader } from "../../components/pages/landing/shared/Headings"; import { examples } from "./generated/exampleComponents.gen"; import "../pages/landing/gradients.css"; 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; isProExample?: { userStatus: "business" | "starter" | "free" | undefined; }; }) { const showCode = !props.isProExample || props.isProExample.userStatus === "starter" || props.isProExample.userStatus === "business"; return (
{showCode && (
GitHub
StackBlitz
)}
{showCode ? ( props.children ) : (
Pro Example

Get access to the full source code for pro examples by subscribing to BlockNote Pro

Get BlockNote Pro
{!props.isProExample?.userStatus && (

Or{" "} {" "} via GitHub

)}
)}
); }