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:
35
components/rich-text/block-quote.tsx
Normal file
35
components/rich-text/block-quote.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
|
||||
import { RichTextTemplate } from "@tinacms/schema-tools";
|
||||
import React from "react";
|
||||
|
||||
export interface BlockQuoteProps {
|
||||
children: TinaMarkdownContent;
|
||||
authorName: string;
|
||||
}
|
||||
|
||||
const BlockQuote = (props: BlockQuoteProps): React.ReactElement => (
|
||||
<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;
|
||||
Reference in New Issue
Block a user