import { Image, Plain, Text, types } from 'react-bricks/rsc' import { LayoutProps, neutralBackgroundSideGroup, paddingBordersSideGroup, sectionDefaults, } from '../../LayoutSideProps' import blockNames from '../../blockNames' import { textColors } from '../../colors' import Container from '../../shared/components/Container' import Section from '../../shared/components/Section' import { avatars, iconLogos } from '../../shared/defaultImages' export interface TestimonialProps extends LayoutProps { quote: types.TextValue authorName: types.TextValue authorJobTitle: types.TextValue avatarImage: types.IImageSource logoImage: types.IImageSource } const Testimonial: types.Brick = ({ quote, authorName, authorJobTitle, avatarImage, logoImage, backgroundColor, borderTop, borderBottom, paddingTop, paddingBottom, }) => { return (
(
{props.children}
)} placeholder="Quote..." renderPlaceholder={(props) => { return {props.children} }} /> {
(
{props.children}
)} placeholder="Name..." /> (
{props.children}
)} placeholder="Job title..." />
{ (
{children}
)} />
) } Testimonial.schema = { name: blockNames.Testimonial, label: 'Testimonial', category: 'testimonials', playgroundLinkLabel: 'View source code on Github', playgroundLinkUrl: 'https://github.com/ReactBricks/reactbricks-starters/blob/main/packages/reactbricks-ui/nextjs-app/src/testimonials/Testimonial/Testimonial.tsx', previewImageUrl: `/bricks-preview-images/${blockNames.Testimonial}.png`, getDefaultProps: () => ({ ...sectionDefaults, borderTop: 'boxed', paddingBottom: '20', quote: 'React Bricks allowed us to quickly create a beautiful website that drives business goals and is easy to maintain. No one from the marketing team would ever go back!', authorName: 'Matteo Frana', authorJobTitle: 'Founder @ React Bricks', avatarImage: avatars.MATTEO_FRANA, logoImage: iconLogos.REACT_BRICKS, }), sideEditProps: [neutralBackgroundSideGroup, paddingBordersSideGroup], } export default Testimonial