PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.0
GenerateBlocks v1.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 6 years ago attributes.js 6 years ago block.js 6 years ago edit.js 6 years ago editor.scss 6 years ago save.js 6 years ago
block.js
42 lines
1 /**
2 * Block: Grid
3 */
4
5 import './editor.scss';
6
7 import editGridContainer from './edit';
8 import saveGridContainer from './save';
9 import blockAttributes from './attributes';
10 import getIcon from '../../utils/get-icon';
11
12 const { __ } = wp.i18n;
13 const { registerBlockType } = wp.blocks;
14
15 /**
16 * Register our Grid block.
17 *
18 * @param {string} name Block name.
19 * @param {Object} settings Block settings.
20 * @return {?WPBlock} The block, if it has been successfully
21 * registered; otherwise `undefined`.
22 */
23 registerBlockType( 'generateblocks/grid', {
24 title: __( 'Grid', 'generateblocks' ),
25 description: __( 'Create advanced layouts with flexible grids.', 'generateblocks' ),
26 icon: getIcon( 'grid' ),
27 category: 'generateblocks',
28 keywords: [
29 __( 'grid' ),
30 __( 'column' ),
31 __( 'generate' ),
32 ],
33 attributes: blockAttributes,
34 supports: {
35 anchor: false,
36 className: false,
37 customClassName: false,
38 },
39 edit: editGridContainer,
40 save: saveGridContainer,
41 } );
42