add placeholder markup to example block editor file
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
// block.json's editorScript, loaded only in the block editor
|
||||
|
||||
import metadata from './block.json';
|
||||
import { registerBlockType } from '@wordpress/blocks';
|
||||
import { useBlockProps } from '@wordpress/block-editor';
|
||||
import metadata from './block.json';
|
||||
import { containerClassNames, sectionClassNames } from '../../../js/blocks/lib/classNames';
|
||||
|
||||
registerBlockType(metadata.name, {
|
||||
edit() {
|
||||
edit({ attributes }) {
|
||||
const blockProps = useBlockProps();
|
||||
|
||||
blockProps.className = sectionClassNames(attributes, blockProps.className, ['bg-success', 'knockout']).join(' ');
|
||||
|
||||
return (
|
||||
<section { ...blockProps }>
|
||||
<h2>Bad Egg Block Example</h2>
|
||||
</section>
|
||||
<div { ...blockProps }>
|
||||
<div className="container align-center wysiwyg">
|
||||
<h2>Bad Egg Block Example</h2>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user