import classNames from 'classnames' import { Image, RichText, Text, types, Link } from 'react-bricks/rsc' 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 { icons } from '../../shared/defaultImages' export interface FeatureCalloutProps extends LayoutProps { image: types.IImageSource title: types.TextValue text: types.TextValue } const FeatureCallout: types.Brick = ({ backgroundColor, borderTop, borderBottom, paddingTop, paddingBottom, image, title, text, }) => { return (
image
(
{props.children}
)} placeholder="Title" /> ( {props.children} )} placeholder="Text" allowedFeatures={[types.RichTextFeatures.Link]} renderLink={(props) => ( {props.children} )} />
) } FeatureCallout.schema = { name: blockNames.FeatureCallout, label: 'Feature callout', category: 'main content', tags: ['feature', 'single feature', 'highlight'], playgroundLinkLabel: 'View source code on Github', playgroundLinkUrl: 'https://github.com/ReactBricks/reactbricks-starters/blob/main/packages/reactbricks-ui/nextjs-app/src/mainContent/FeatureCallout/FeatureCallout.tsx', previewImageUrl: `/bricks-preview-images/${blockNames.FeatureCallout}.png`, getDefaultProps: () => ({ ...sectionDefaults, borderTop: 'boxed', paddingTop: '12', paddingBottom: '12', title: 'Easy like Wix, but your own.', text: 'A great user experience for Content creators, React components for Developers.', image: icons.PHOTOS, }), sideEditProps: [backgroundSideGroup, paddingBordersSideGroup], } export default FeatureCallout