Template
16 lines
1.0 KiB
TypeScript
16 lines
1.0 KiB
TypeScript
import type { ComponentConfig } from '@reacteditor/core';
|
|
import { MousePointerClick } from 'lucide-react';
|
|
import Cta, { type CtaProps } from './cta';
|
|
|
|
const ctaConfig: ComponentConfig<CtaProps> = {
|
|
label: 'Call to action', icon: <MousePointerClick size={16} />, category: 'conversion',
|
|
defaultProps: { heading: 'Add a clear call to action.', description: 'Use this space to explain what visitors should do next and why it matters.', primaryLabel: 'Get started', primaryUrl: '/contact', secondaryLabel: '', secondaryUrl: '/contact' },
|
|
fields: {
|
|
heading: { label: 'Heading', type: 'textarea', contentEditable: true }, description: { label: 'Description', type: 'textarea', contentEditable: true },
|
|
primaryLabel: { label: 'Primary CTA', type: 'text', contentEditable: true }, primaryUrl: { label: 'Primary URL', type: 'text' }, secondaryLabel: { label: 'Secondary CTA', type: 'text', contentEditable: true }, secondaryUrl: { label: 'Secondary URL', type: 'text' },
|
|
},
|
|
render: (props) => <Cta {...props} />,
|
|
};
|
|
|
|
export default ctaConfig;
|