Renamed inlineComponents to richTextComponents as this is closer to what they are
This commit was merged in pull request #16.
This commit is contained in:
@@ -6,7 +6,7 @@ import type { Template } from "tinacms";
|
||||
import { PageBlocksContent } from "../../tina/__generated__/types";
|
||||
import { tinaField } from "tinacms/dist/react";
|
||||
import { PageBlockFunction } from "../blocks-renderer";
|
||||
import inlineComponents, { richTextTemplates } from "../inline/inline-definitions";
|
||||
import richTextComponents, { richTextTemplates } from "../rich-text/rich-text-definitions";
|
||||
|
||||
export const Content: PageBlockFunction<PageBlocksContent> = ({ data }) => {
|
||||
return (
|
||||
@@ -17,7 +17,7 @@ export const Content: PageBlockFunction<PageBlocksContent> = ({ data }) => {
|
||||
size="custom"
|
||||
width="large"
|
||||
>
|
||||
<TinaMarkdown components={ inlineComponents } content={ data.body } />
|
||||
<TinaMarkdown components={ richTextComponents } content={ data.body } />
|
||||
</Container>
|
||||
</Section>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ import format from "date-fns/format";
|
||||
import { TinaMarkdown } from "tinacms/dist/rich-text";
|
||||
import { PostType } from "../../pages/posts/[filename]";
|
||||
import { tinaField } from "tinacms/dist/react";
|
||||
import inlineComponents from "../inline/inline-definitions";
|
||||
import richTextComponents from "../rich-text/rich-text-definitions";
|
||||
|
||||
export const Post = (props: PostType) => {
|
||||
const date = new Date(props.date);
|
||||
@@ -97,7 +97,7 @@ export const Post = (props: PostType) => {
|
||||
data-tina-field={ tinaField(props, "_body") }
|
||||
className="prose dark:prose-dark w-full max-w-none"
|
||||
>
|
||||
<TinaMarkdown components={ inlineComponents } content={ props._body } />
|
||||
<TinaMarkdown components={ richTextComponents } content={ props._body } />
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
@@ -19,7 +19,7 @@ const HTMLInline = (props: { value: string }) => {
|
||||
return <span dangerouslySetInnerHTML={ createSanitizedMarkup(props.value) } />;
|
||||
};
|
||||
|
||||
const inlineComponents: Components<{
|
||||
const richTextComponents: Components<{
|
||||
BlockQuote: BlockQuoteProps;
|
||||
DateTime: DateTimeProps;
|
||||
Image: ImageProps;
|
||||
@@ -45,4 +45,4 @@ export const richTextTemplates: RichTextTemplate[] = [
|
||||
imageSchema
|
||||
];
|
||||
|
||||
export default inlineComponents;
|
||||
export default richTextComponents;
|
||||
Reference in New Issue
Block a user