UNPKG

@automattic/social-previews

Version:

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

12 lines 589 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SectionHeading = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const HEADING_LEVELS = [2, 3, 4, 5, 6]; const SectionHeading = ({ className, level, children, }) => { const Tag = `h${level && HEADING_LEVELS.includes(level) ? level : 3}`; return ((0, jsx_runtime_1.jsx)(Tag, { className: `social-preview__section-heading ${className ?? ''}`, children: children })); }; exports.SectionHeading = SectionHeading; exports.default = exports.SectionHeading; //# sourceMappingURL=index.js.map