UNPKG

@wordpress/block-library

Version:
38 lines (37 loc) • 938 B
import { InnerBlocks, useBlockProps } from "@wordpress/block-editor"; import { jsx } from "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 = useBlockProps.save(); const { className } = blockProps; const newClasses = (className?.split(" ") || [])?.filter((cls) => cls !== "wp-block-comments"); const newBlockProps = { ...blockProps, className: newClasses.join(" ") }; return /* @__PURE__ */ jsx(Tag, { ...newBlockProps, children: /* @__PURE__ */ jsx(InnerBlocks.Content, {}) }); } }]; export { deprecated_default as default }; //# sourceMappingURL=deprecated.mjs.map