Added Blockquote Component
This commit is contained in:
34
src/keystatic/components/general/blockquote.ts
Normal file
34
src/keystatic/components/general/blockquote.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { textQuoteIcon } from '@keystar/ui/icon/icons/textQuoteIcon';
|
||||
import { block } from '@keystatic/core/content-components';
|
||||
import { fields } from '@keystatic/core';
|
||||
|
||||
const blockquoteComponents = {
|
||||
Blockquote: block({
|
||||
label: 'Blockquote',
|
||||
icon: textQuoteIcon,
|
||||
schema: {
|
||||
quote: fields.text({
|
||||
label: 'Quote',
|
||||
multiline: true,
|
||||
validation: {
|
||||
length: {
|
||||
min: 1,
|
||||
},
|
||||
},
|
||||
}),
|
||||
attribution: fields.text({
|
||||
label: 'Attribution',
|
||||
description: 'Author or Speaker',
|
||||
}),
|
||||
source: fields.text({
|
||||
label: 'Source',
|
||||
description: 'Book, article, or document [optional]',
|
||||
}),
|
||||
url: fields.url({
|
||||
label: 'Source URL',
|
||||
}),
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
export default blockquoteComponents;
|
||||
@@ -2,10 +2,12 @@ import gridComponents from '@/keystatic/components/general/grid';
|
||||
import sidenoteComponents from '@/keystatic/components/general/sidenote';
|
||||
import definitionlistComponents from '@/keystatic/components/general/definitionlist';
|
||||
import accordionComponents from '@/keystatic/components/general/accordion';
|
||||
import blockquoteComponents from '@/keystatic/components/general/blockquote';
|
||||
|
||||
export const generalComponents = {
|
||||
...gridComponents,
|
||||
...sidenoteComponents,
|
||||
...definitionlistComponents,
|
||||
...accordionComponents,
|
||||
...blockquoteComponents,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user