@wordpress/block-library
Version:
Block library for the WordPress editor.
35 lines (34 loc) • 1.39 kB
JavaScript
// packages/block-library/src/heading/variations.js
import { __ } from "@wordpress/i18n";
import { Path, SVG } from "@wordpress/primitives";
import { heading } from "@wordpress/icons";
import { jsx } from "react/jsx-runtime";
var variations = [
{
name: "heading",
title: __("Heading"),
description: __(
"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."
),
isDefault: true,
scope: ["inserter", "transform"],
attributes: { fitText: void 0 },
icon: heading
},
// There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
// to make Stretchy variations appear as the last of their sections in the inserter.
{
name: "stretchy-heading",
title: __("Stretchy Heading"),
description: __("Heading that resizes to fit its container."),
icon: /* @__PURE__ */ jsx(SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx(Path, { d: "m3 18.6 6-4.7 6 4.7V5H3v13.6Zm16.2-9.8v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
attributes: { fitText: true },
scope: ["inserter", "transform"],
isActive: (blockAttributes) => blockAttributes.fitText === true
}
];
var variations_default = variations;
export {
variations_default as default
};
//# sourceMappingURL=variations.js.map