Closed pyk closed 3 years ago
I tried to create custom block components for callout, but currently createRenderChildText is not exported.
callout
createRenderChildText
With this small changes, I can do the following now:
import { NotionRenderer, createRenderChildText } from "react-notion"; // ... const notionRenderChildText = createRenderChildText(); // Component <NotionRenderer blockMap={notionBlocks ?? {}} customBlockComponents={{ callout: ({ blockValue, renderComponent }) => ( <div className="custom-class"> {notionRenderChildText(blockValue.properties.title)} </div> ), }} />
Thank you!
Looks good, thanks! :)
I tried to create custom block components for
callout
, but currentlycreateRenderChildText
is not exported.With this small changes, I can do the following now:
Thank you!