@wordpress/block-library
Version:
Block library for the WordPress editor.
24 lines (23 loc) • 938 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/text-columns/save.jsx
function save({ attributes }) {
const { width, content, columns } = attributes;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
..._wordpress_block_editor.useBlockProps.save({ className: `align${width} columns-${columns}` }),
children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
className: "wp-block-column",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.RichText.Content, {
tagName: "p",
value: content?.[index]?.children
})
}, `column-${index}`))
});
}
exports.default = save;
//# sourceMappingURL=save.cjs.map