PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 2.25.0
Block Animations, Motion & Scroll Effects – Ghost Kit v2.25.0
3.7.2 3.7.1 3.7.0 3.6.1 trunk 1.6.3 2.25.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.6.0
ghostkit / gutenberg / blocks / form / fields / submit / save.js

save.js in Block Animations, Motion & Scroll Effects – Ghost Kit 2.25.0, at gutenberg/blocks/form/fields/submit/save.js

50 lines 878 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * External dependencies
3 */
4 import classnames from 'classnames/dedupe';
5
6 /**
7 * Internal dependencies
8 */
9 import metadata from './block.json';
10
11 /**
12 * WordPress dependencies
13 */
14 const { applyFilters } = wp.hooks;
15
16 const { InnerBlocks } = wp.blockEditor;
17
18 const { Component } = wp.element;
19
20 const { name } = metadata;
21
22 /**
23 * Block Save Class.
24 */
25 class BlockSave extends Component {
26 render() {
27 const { align } = this.props.attributes;
28
29 let className = classnames(
30 'ghostkit-form-submit-button',
31 align && align !== 'none' ? `ghostkit-form-submit-button-align-${align}` : false
32 );
33
34 className = applyFilters('ghostkit.blocks.className', className, {
35 ...{
36 name,
37 },
38 ...this.props,
39 });
40
41 return (
42 <div className={className}>
43 <InnerBlocks.Content />
44 </div>
45 );
46 }
47 }
48
49 export default BlockSave;
50