Files
local-content-pro/includes/blocks/lcp-sidecontent/src/save.js
2025-01-03 16:33:20 -08:00

35 lines
972 B
JavaScript

/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
/**
* The save function defines the way in which the different attributes should
* be combined into the final markup, which is then serialized by the block
* editor into `post_content`.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
*
* @return {Element} Element to render.
*/
export default function Save() {
const blockProps = useBlockProps.save();
return (
<div {...blockProps} id="lcp-sidecontent">
<div id="lcp-sidecontent-inner">
<InnerBlocks.Content />
</div>
</div>
);
}