Create basic block
[MAILPOET-1798]
This commit is contained in:
committed by
Jack Kitterhing
parent
f11102ab34
commit
261624c2bb
1
assets/js/src/post_editor_block/blocks.jsx
Normal file
1
assets/js/src/post_editor_block/blocks.jsx
Normal file
@@ -0,0 +1 @@
|
||||
import './form_block.jsx';
|
19
assets/js/src/post_editor_block/form_block.jsx
Normal file
19
assets/js/src/post_editor_block/form_block.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
const wp = window.wp;
|
||||
const { registerBlockType } = wp.blocks;
|
||||
|
||||
registerBlockType('mailpoet/form-block', {
|
||||
title: 'Example: Basic (esnext)',
|
||||
icon: 'universal-access-alt',
|
||||
category: 'widgets',
|
||||
example: {},
|
||||
edit() {
|
||||
return (
|
||||
<div className="mailpoet-block-div">Hello World, step 1 (from the editor).</div>
|
||||
);
|
||||
},
|
||||
save() {
|
||||
return null;
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user