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 / grid / block.js
generateblocks / src / blocks / grid Last commit date
css 5 years ago attributes.js 4 years ago block.js 4 years ago deprecated.js 5 years ago edit.js 4 years ago editor.scss 5 years ago
block.js
54 lines
1 /**
2 * Block: Grid
3 */
4
5 import './editor.scss';
6
7 import editGridContainer from './edit';
8 import blockAttributes from './attributes';
9 import getIcon from '../../utils/get-icon';
10 import deprecated from './deprecated';
11
12 import {
13 __,
14 } from '@wordpress/i18n';
15
16 import {
17 registerBlockType,
18 } from '@wordpress/blocks';
19
20 import {
21 InnerBlocks,
22 } from '@wordpress/block-editor';
23
24 /**
25 * Register our Grid block.
26 *
27 * @param {string} name Block name.
28 * @param {Object} settings Block settings.
29 * @return {?WPBlock} The block, if it has been successfully
30 * registered; otherwise `undefined`.
31 */
32 registerBlockType( 'generateblocks/grid', {
33 title: __( 'Grid', 'generateblocks' ),
34 description: __( 'Create advanced layouts with flexible grids.', 'generateblocks' ),
35 icon: getIcon( 'grid' ),
36 category: 'generateblocks',
37 keywords: [
38 __( 'grid' ),
39 __( 'column' ),
40 __( 'generate' ),
41 ],
42 attributes: blockAttributes,
43 supports: {
44 className: false,
45 },
46 edit: editGridContainer,
47 save: () => {
48 return (
49 <InnerBlocks.Content />
50 );
51 },
52 deprecated,
53 } );
54