import * as React from 'react' import { Image, Plain, Text, types } from 'react-bricks/frontend' import { LayoutProps, neutralBackgroundSideGroup, paddingBordersSideGroup, sectionDefaults, } from '../../LayoutSideProps' import { avatars, iconLogos } from '../../shared/defaultImages' import blockNames from '../../blockNames' import { textColors } from '../../colors' import Container from '../../shared/components/Container' import Section from '../../shared/components/Section' export interface TestimonialProps extends LayoutProps { authorName: types.TextValue authorJobTitle: types.TextValue avatarImage: types.IImageSource logoImage: types.IImageSource quote: types.TextValue } const Testimonial: types.Brick = ({ authorName, authorJobTitle, backgroundColor, borderTop, borderBottom, paddingTop, paddingBottom, quote, avatarImage, logoImage, }) => { return (
(
{props.children}
)} placeholder="Quote..." renderPlaceholder={(props) => { return {props.children} }} propName="quote" value={quote} /> {
(
{props.children}
)} placeholder="Name..." propName="authorName" value={authorName} /> (
{props.children}
)} placeholder="Job title..." propName="authorJobTitle" value={authorJobTitle} />
{ (
{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-pages/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