UNPKG

@wordpress/block-library

Version:
33 lines (31 loc) 746 B
import { createElement } from "@wordpress/element"; /** * External dependencies */ import { get } from 'lodash'; /** * WordPress dependencies */ import { RichText, useBlockProps } from '@wordpress/block-editor'; export default function save(_ref) { let { attributes } = _ref; const { width, content, columns } = attributes; return createElement("div", useBlockProps.save({ className: `align${width} columns-${columns}` }), Array.from({ length: columns }).map((_, index) => createElement("div", { className: "wp-block-column", key: `column-${index}` }, createElement(RichText.Content, { tagName: "p", value: get(content, [index, 'children']) })))); } //# sourceMappingURL=save.js.map