Changes to blocks

This commit is contained in:
Jeremy Rangel
2024-12-22 15:20:12 -08:00
parent cfbb860bf9
commit f3fbe0fa32
25 changed files with 612 additions and 1035 deletions

View File

@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
function main_content_init() {
function lcp_main_content_init() {
register_block_type( __DIR__ . '/build' );
}
add_action( 'init', 'main_content_init' );
add_action( 'init', 'lcp_main_content_init' );

View File

@ -37,7 +37,7 @@ export default function Edit(props) {
</InspectorControls>
{/* Main block content */}
<div {...innerBlocksProps} style={style}>
<div {...innerBlocksProps} id="lcp-main-wrap">
<InnerBlocks {...innerBlocksProps} />

View File

@ -7,3 +7,7 @@
.wp-block-create-block-lcp-viewport {
border: 1px dotted #f00;
}
#lcp-main-wrap {
margin-left:340px
}

View File

@ -23,7 +23,7 @@ export default function Save( {attributes} ) {
maxWidth: maxWidth,
};
return (
<div {...blockProps} id="lcp-main-content" style={style}>
<div {...blockProps} id="lcp-main-wrap" style={style}>
<InnerBlocks.Content />