UNPKG

@wordpress/block-library

Version:
44 lines (43 loc) • 1.37 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_i18n = require("@wordpress/i18n"); let _wordpress_icons = require("@wordpress/icons"); // packages/block-library/src/heading/variations.js const LEVEL_ICONS = [ _wordpress_icons.headingLevel1, _wordpress_icons.headingLevel2, _wordpress_icons.headingLevel3, _wordpress_icons.headingLevel4, _wordpress_icons.headingLevel5, _wordpress_icons.headingLevel6 ]; const variations = [...[ 1, 2, 3, 4, 5, 6 ].map((level) => ({ name: `h${level}`, title: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Heading %d"), level), description: (0, _wordpress_i18n.__)("Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."), icon: LEVEL_ICONS[level - 1], attributes: { level }, scope: ["block", "transform"], keywords: [`h${level}`], isActive: (blockAttributes) => blockAttributes.level === level, shortcut: { name: `core/block-editor/transform-to-heading-${level}`, description: (0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("Transform the selected block into a heading %d."), level), keyCombination: { modifier: "access", character: `${level}` } } }))]; exports.default = variations; //# sourceMappingURL=variations.cjs.map