import classNames from 'classnames' import { Link, Plain, Repeater, Text, types } from 'react-bricks/rsc' import { FcDepartment, FcPhone, FcVoicePresentation } from 'react-icons/fc' import blockNames from '../../blockNames' import { textColors } from '../../colors' import { backgroundSideGroup, LayoutProps, paddingBordersSideGroup, sectionDefaults, } from '../../LayoutSideProps' import Container from '../../shared/components/Container' import Section from '../../shared/components/Section' import TitleSubtitle from '../../shared/components/TitleSubtitle' import ReCaptchaProvider from '../FormSection/ReCaptchaProvider' export interface ContactsFormProps extends LayoutProps { phoneNumber: types.TextValue email: types.TextValue address: types.TextValue form: types.RepeaterItems title: types.TextValue subtitle: types.TextValue } const ContactsForm: types.Brick = ({ backgroundColor, borderTop, borderBottom, paddingTop, paddingBottom, address, phoneNumber, email, form, title, subtitle, }) => { const reCaptchaKey = process.env.NEXT_PUBLIC_RECAPTCHA_KEY || '' return (
  • ( {props.children} )} />
  • {children}} />
  • {children}} />
) } ContactsForm.schema = { name: 'ContactsForm', label: 'Contacts with Form', category: 'contact', previewImageUrl: `/bricks-preview-images/contacts-with-form.png`, playgroundLinkLabel: 'View source code on Github', playgroundLinkUrl: 'https://github.com/ReactBricks/reactbricks-starters/blob/main/packages/reactbricks-ui/nextjs-app/src/contacts/ContactsForm/ContactsForm.tsx', getDefaultProps: () => ({ ...sectionDefaults, address: '4556 Brendan Ferry\nLos Angeles, CA 90210', phoneNumber: '+1 (555) 423-5786', email: 'hello@example.com', title: 'Contact us', subtitle: 'Do you have a project in mind? We are happy to talk with you to understand your needs, prepare a quote for you and make it happen!', }), sideEditProps: [backgroundSideGroup, paddingBordersSideGroup], repeaterItems: [ { name: 'form', itemType: blockNames.FormBuilder, itemLabel: 'form', min: 0, max: 1, }, ], } export default ContactsForm