UNPKG

@wordpress/block-library

Version:
20 lines (18 loc) 609 B
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