Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mintplugins/d1640296e31ea8a3b43610c15c5dcc5a to your computer and use it in GitHub Desktop.
Save mintplugins/d1640296e31ea8a3b43610c15c5dcc5a to your computer and use it in GitHub Desktop.
Static JSX Gutenberg Block
const { __ } = wp.i18n;
const { registerBlockType } = wp.blocks;
registerBlockType( 'my-custom-gutenberg-block/static-jsx-example', {
title: __( 'Static Block Example with JSX' ),
icon: 'lock',
category: 'common',
edit() {
return (
<p>Static block example built with JSX.</p>
);
},
save() {
return (
<p>Static block example built with JSX.</p>
);
},
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment