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 / button / block.js
generateblocks / src / blocks / button 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 style.scss 6 years ago
block.js
45 lines
1 /**
2 * Block: Buttons
3 */
4
5 import './style.scss';
6 import './editor.scss';
7
8 import editButtonContainer from './edit';
9 import saveButtonContainer from './save';
10 import blockAttributes from './attributes';
11 import getIcon from '../../utils/get-icon';
12
13 const { __ } = wp.i18n;
14 const { registerBlockType } = wp.blocks;
15
16 /**
17 * Register our Button block.
18 *
19 * @param {string} name Block name.
20 * @param {Object} settings Block settings.
21 * @return {?WPBlock} The block, if it has been successfully
22 * registered; otherwise `undefined`.
23 */
24 registerBlockType( 'generateblocks/button', {
25 title: __( 'Button', 'generateblocks' ),
26 description: __( 'Drive conversions with beautiful buttons.', 'generateblocks' ),
27 parent: [ 'generateblocks/button-container' ],
28 icon: getIcon( 'button' ),
29 category: 'generateblocks',
30 keywords: [
31 __( 'button' ),
32 __( 'buttons' ),
33 __( 'generate' ),
34 ],
35 attributes: blockAttributes,
36 supports: {
37 anchor: false,
38 className: false,
39 customClassName: false,
40 inserter: false,
41 },
42 edit: editButtonContainer,
43 save: saveButtonContainer,
44 } );
45