Create basic block

[MAILPOET-1798]
This commit is contained in:
Pavel Dohnal
2020-01-30 14:05:51 +01:00
committed by Jack Kitterhing
parent f11102ab34
commit 261624c2bb
8 changed files with 87 additions and 1 deletions

View File

@@ -0,0 +1 @@
import './form_block.jsx';

View 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;
},
});