diff --git a/packages/react/lib/Block.tsx b/packages/react/lib/Block.tsx index 5c8b8ac..c2a2637 100644 --- a/packages/react/lib/Block.tsx +++ b/packages/react/lib/Block.tsx @@ -1,6 +1,7 @@ import React from "react"; import debug from "debug"; import { BlockValues, TextSection, TextModifier } from "@notion-cms/types"; +import NotionLink from "./NotionLink"; const log = debug("notion-cms:react"); @@ -19,6 +20,12 @@ const applyModifier = ( return {children}; case "a": return {children}; + case "p": + return ( + + Page {mod[1]} + + ); default: log('Ignoring unknown text modifier "%s": %O', mod[0], mod); return children; diff --git a/packages/types/lib/index.ts b/packages/types/lib/index.ts index 9b13f88..9f30631 100644 --- a/packages/types/lib/index.ts +++ b/packages/types/lib/index.ts @@ -66,7 +66,7 @@ export interface PageBlockValues extends BaseBlockValues { }; } -export type TextModifier = ["b"] | ["i"] | ["a", string]; +export type TextModifier = ["b"] | ["i"] | ["a", string] | ["p", UUID]; export type TextSection = [string, TextModifier[]]; interface TextBlockValues