UNPKG

@wordpress/block-library

Version:
33 lines (31 loc) 883 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = save; var _blockEditor = require("@wordpress/block-editor"); var _jsxRuntime = require("react/jsx-runtime"); /** * WordPress dependencies */ function save({ attributes }) { const { name, showContent } = attributes; const summary = attributes.summary ? attributes.summary : 'Details'; const blockProps = _blockEditor.useBlockProps.save(); return /*#__PURE__*/(0, _jsxRuntime.jsxs)("details", { ...blockProps, name: name || undefined, open: showContent, children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("summary", { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, { value: summary }) }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InnerBlocks.Content, {})] }); } //# sourceMappingURL=save.js.map