a working react/php dynamic wordpress block example integrated with the Vite build process
This commit is contained in:
12
resources/views/blocks/example/index.jsx
Normal file
12
resources/views/blocks/example/index.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { registerBlockType } from '@wordpress/blocks';
|
||||
|
||||
registerBlockType('badegg/example', {
|
||||
apiVersion: 3, // optional in JS, primarily in block.json
|
||||
edit() {
|
||||
return (
|
||||
<section className="block-badegg-example">
|
||||
<h2>Bad Egg Block Example</h2>
|
||||
</section>
|
||||
);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user