@wordpress/block-library
Version:
Block library for the WordPress editor.
36 lines (34 loc) • 869 B
JavaScript
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 {
width,
content,
columns
} = attributes;
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
..._blockEditor.useBlockProps.save({
className: `align${width} columns-${columns}`
}),
children: Array.from({
length: columns
}).map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "wp-block-column",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, {
tagName: "p",
value: content?.[index]?.children
})
}, `column-${index}`))
});
}
//# sourceMappingURL=save.js.map
;