Template
Initial react editor website template
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { ComponentConfig } from '@reacteditor/core';
|
||||
import { MessagesSquare } from 'lucide-react';
|
||||
import Testimonials, { type TestimonialsProps } from './testimonials';
|
||||
|
||||
const testimonialsConfig: ComponentConfig<TestimonialsProps> = {
|
||||
label: 'Testimonials', icon: <MessagesSquare size={16} />, category: 'social-proof',
|
||||
defaultProps: {
|
||||
heading: 'Share what customers say about your business.',
|
||||
testimonials: [
|
||||
{ quote: 'Add a short customer quote that explains the value of your work.', name: 'Customer name', role: 'Role, Company', avatarUrl: '' },
|
||||
{ quote: 'Use a second testimonial to reinforce the outcome customers can expect.', name: 'Customer name', role: 'Role, Company', avatarUrl: '' },
|
||||
{ quote: 'Keep each quote focused, credible, and easy for visitors to scan.', name: 'Customer name', role: 'Role, Company', avatarUrl: '' },
|
||||
],
|
||||
},
|
||||
fields: {
|
||||
heading: { label: 'Heading', type: 'textarea', contentEditable: true },
|
||||
testimonials: { label: 'Testimonials', type: 'array', defaultItemProps: { quote: 'Share a customer story.', name: 'Customer name', role: 'Role, Company', avatarUrl: '' }, getItemSummary: (item) => item?.name || 'Testimonial', arrayFields: { quote: { label: 'Quote', type: 'textarea', contentEditable: true }, name: { label: 'Name', type: 'text', contentEditable: true }, role: { label: 'Role and company', type: 'text', contentEditable: true }, avatarUrl: { label: 'Avatar', type: 'image' } } },
|
||||
},
|
||||
render: (props) => <Testimonials {...props} />,
|
||||
};
|
||||
|
||||
export default testimonialsConfig;
|
||||
Reference in New Issue
Block a user