@wordpress/block-library
Version:
Block library for the WordPress editor.
22 lines (21 loc) • 977 B
JavaScript
;
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");
// packages/block-library/src/details/save.jsx
function save({ attributes }) {
const { name, showContent } = attributes;
const summary = attributes.summary ? attributes.summary : "Details";
const blockProps = _wordpress_block_editor.useBlockProps.save();
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
...blockProps,
name: name || void 0,
open: showContent,
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.RichText.Content, { value: summary }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.InnerBlocks.Content, {})]
});
}
exports.default = save;
//# sourceMappingURL=save.cjs.map