23 lines
539 B
TypeScript
23 lines
539 B
TypeScript
import { EtibBlock } from './types';
|
|
import { Callout as CalloutComponent } from '@/components/ui/Callout';
|
|
import { lexicalEditor } from '@payloadcms/richtext-lexical';
|
|
|
|
export const Callout: EtibBlock = {
|
|
slug: 'callout',
|
|
render: CalloutComponent,
|
|
fields: [
|
|
{
|
|
name: 'type',
|
|
type: 'select',
|
|
options: ['info', 'warning', 'important', 'tip', 'caution'],
|
|
defaultValue: 'info',
|
|
},
|
|
{
|
|
name: 'content',
|
|
type: 'richText',
|
|
editor: lexicalEditor({}),
|
|
required: true,
|
|
},
|
|
],
|
|
};
|