auto-registering blocks in php and javascript with dynamic enqueuing of associated styles and scripts with support for scss and blade
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
// block.json's editorScript, loaded only in the block editor
|
||||
|
||||
import { registerBlockType } from '@wordpress/blocks';
|
||||
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
|
||||
import metadata from './block.json';
|
||||
import allowedBlocks from '../../../json/core-block-whitelist.json';
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
icon: {
|
||||
src: 'format-aside',
|
||||
foreground: '#f58762',
|
||||
},
|
||||
edit({ attributes, setAttributes }) {
|
||||
const blockProps = useBlockProps();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user