@wordpress/block-library
Version:
Block library for the WordPress editor.
20 lines (18 loc) • 609 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* WordPress dependencies
*/
import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';
export default function save(_ref) {
let {
attributes: {
tagName: Tag,
legacy
}
} = _ref;
const blockProps = useBlockProps.save();
const innerBlocksProps = useInnerBlocksProps.save(blockProps); // The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner
// blocks, so nothing is saved in that case.
return legacy ? null : createElement(Tag, innerBlocksProps);
}
//# sourceMappingURL=save.js.map