UNPKG

@automattic/social-previews

Version:

A suite of components to generate previews for a post for both social and search engines.

13 lines 1.58 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { __ } from '@wordpress/i18n'; import SectionHeading from '../shared/section-heading'; import { NextdoorLinkPreview } from './link-preview'; import { NextdoorPostPreview } from './post-preview'; export const NextdoorPreviews = ({ headingLevel, hideLinkPreview, hidePostPreview, ...props }) => { return (_jsxs("div", { className: "social-preview nextdoor-preview", children: [!hidePostPreview && (_jsxs("section", { className: "social-preview__section nextdoor-preview__section", children: [_jsx(SectionHeading, { level: headingLevel, children: // translators: refers to a social post on Nextdoor __('Your post', 'social-previews') }), _jsx("p", { className: "social-preview__section-desc", children: __('This is what your social post will look like on Nextdoor:', 'social-previews') }), _jsx(NextdoorPostPreview, { ...props })] })), !hideLinkPreview && (_jsxs("section", { className: "social-preview__section nextdoor-preview__section", children: [_jsx(SectionHeading, { level: headingLevel, children: // translators: refers to a link to a Nextdoor post __('Link preview', 'social-previews') }), _jsx("p", { className: "social-preview__section-desc", children: __('This is what it will look like when someone shares the link to your WordPress post on Nextdoor.', 'social-previews') }), _jsx(NextdoorLinkPreview, { ...props, name: "", profileImage: "" })] }))] })); }; //# sourceMappingURL=previews.js.map