@automattic/social-previews
Version:
A suite of components to generate previews for a post for both social and search engines.
8 lines • 413 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
const HEADING_LEVELS = [2, 3, 4, 5, 6];
export const SectionHeading = ({ className, level, children, }) => {
const Tag = `h${level && HEADING_LEVELS.includes(level) ? level : 3}`;
return (_jsx(Tag, { className: `social-preview__section-heading ${className ?? ''}`, children: children }));
};
export default SectionHeading;
//# sourceMappingURL=index.js.map