PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.4.0
GenerateBlocks v1.4.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / blocks / container / block.js
generateblocks / src / blocks / container Last commit date
css 4 years ago attributes.js 4 years ago block-controls.js 4 years ago block.js 4 years ago deprecated.js 5 years ago edit.js 4 years ago editor.scss 4 years ago
block.js
56 lines
1 /**
2 * Block: Container
3 */
4
5 import './editor.scss';
6 import './block-controls.js';
7
8 import edit from './edit';
9 import blockAttributes from './attributes';
10 import deprecated from './deprecated';
11 import getIcon from '../../utils/get-icon';
12
13 import {
14 __,
15 } from '@wordpress/i18n';
16
17 import {
18 registerBlockType,
19 } from '@wordpress/blocks';
20
21 import {
22 InnerBlocks,
23 } from '@wordpress/block-editor';
24
25 /**
26 * Register our Container block.
27 *
28 * @param {string} name Block name.
29 * @param {Object} settings Block settings.
30 * @return {?WPBlock} The block, if it has been successfully
31 * registered; otherwise `undefined`.
32 */
33 registerBlockType( 'generateblocks/container', {
34 title: __( 'Container', 'generateblocks' ),
35 description: __( 'Organize your content into rows and sections.', 'generateblocks' ),
36 icon: getIcon( 'container' ),
37 category: 'generateblocks',
38 keywords: [
39 __( 'section' ),
40 __( 'container' ),
41 __( 'generate' ),
42 ],
43 attributes: blockAttributes,
44 supports: {
45 align: false,
46 className: false,
47 },
48 edit,
49 save: () => {
50 return (
51 <InnerBlocks.Content />
52 );
53 },
54 deprecated,
55 } );
56