UNPKG

@wordpress/block-library

Version:
43 lines (42 loc) • 1.16 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_block_editor = require("@wordpress/block-editor"); let react_jsx_runtime = require("react/jsx-runtime"); var deprecated_default = [{ attributes: { tagName: { type: "string", default: "div" } }, apiVersion: 3, supports: { align: ["wide", "full"], html: false, color: { gradients: true, link: true, __experimentalDefaultControls: { background: true, text: true, link: true } } }, save({ attributes: { tagName: Tag } }) { const blockProps = _wordpress_block_editor.useBlockProps.save(); const { className } = blockProps; const newClasses = (className?.split(" ") || [])?.filter((cls) => cls !== "wp-block-comments"); const newBlockProps = { ...blockProps, className: newClasses.join(" ") }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, { ...newBlockProps, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.InnerBlocks.Content, {}) }); } }]; exports.default = deprecated_default; //# sourceMappingURL=deprecated.cjs.map