Separated inline components from post.tsx

This commit is contained in:
2023-09-03 19:23:43 +02:00
parent 412ab0810d
commit bfeeb71312
12 changed files with 259 additions and 240 deletions

View File

@@ -0,0 +1,34 @@
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
import { RichTextTemplate } from "@tinacms/schema-tools";
export interface BlockQuoteProps {
children: TinaMarkdownContent;
authorName: string;
}
const BlockQuote = (props: BlockQuoteProps) => (
<div>
<blockquote>
<TinaMarkdown content={ props.children } />
{ props.authorName }
</blockquote>
</div>);
export const blockQuoteSchema: RichTextTemplate = {
name: "BlockQuote",
label: "Block Quote",
fields: [
{
name: "children",
label: "Quote",
type: "rich-text"
},
{
name: "authorName",
label: "Author",
type: "string"
}
]
};
export default BlockQuote;