Created
July 31, 2018 19:00
-
-
Save lucprincen/6a3dc6e5aa3228cde8fc5c194d871719 to your computer and use it in GitHub Desktop.
Revisions
-
lucprincen created this gist
Jul 31, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ const { __ } = wp.i18n; const { InnerBlocks } = wp.editor; const { registerBlockType } = wp.blocks; registerBlockType( 'kit/container', { title: __('Container'), description: __('Add a container for blocks'), category: 'common', supports: { html: false }, edit(props) { const { className } = props; return ( <div className={className}> <InnerBlocks /> </div> ); }, save(props) { const { className } = props; return ( <section className={className}> <InnerBlocks.Content/> </section> ); } } )