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 / phone / edit.js

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

55 lines 1.3 KB
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 FieldLabel from '../../field-label';
10 import FieldDescription from '../../field-description';
11 import { getFieldAttributes, FieldDefaultSettings } from '../../field-attributes';
12
13 /**
14 * WordPress dependencies
15 */
16 const { applyFilters } = wp.hooks;
17
18 const { Component, Fragment } = wp.element;
19
20 const { PanelBody, TextControl } = wp.components;
21
22 const { InspectorControls } = wp.blockEditor;
23
24 /**
25 * Block Edit Class.
26 */
27 class BlockEdit extends Component {
28 render() {
29 const { attributes } = this.props;
30
31 let { className = '' } = this.props;
32
33 className = classnames('ghostkit-form-field ghostkit-form-field-phone', className);
34
35 className = applyFilters('ghostkit.editor.className', className, this.props);
36
37 return (
38 <Fragment>
39 <InspectorControls>
40 <PanelBody>
41 <FieldDefaultSettings {...this.props} />
42 </PanelBody>
43 </InspectorControls>
44 <div className={className}>
45 <FieldLabel {...this.props} />
46 <TextControl type="tel" {...getFieldAttributes(attributes)} />
47 <FieldDescription {...this.props} />
48 </div>
49 </Fragment>
50 );
51 }
52 }
53
54 export default BlockEdit;
55