/** * External dependencies */ import classnames from 'classnames/dedupe'; /** * Internal dependencies */ import FieldLabel from '../../field-label'; import FieldDescription from '../../field-description'; import { getFieldAttributes, FieldDefaultSettings } from '../../field-attributes'; /** * WordPress dependencies */ const { __ } = wp.i18n; const { applyFilters } = wp.hooks; const { Component, Fragment } = wp.element; const { PanelBody, TextControl } = wp.components; const { InspectorControls } = wp.blockEditor; /** * Block Edit Class. */ class BlockEdit extends Component { render() { const { attributes, setAttributes } = this.props; const { min, max, step, default: defaultVal } = attributes; let { className = '' } = this.props; className = classnames('ghostkit-form-field ghostkit-form-field-number', className); className = applyFilters('ghostkit.editor.className', className, this.props); const defaultCustom = ( setAttributes({ default: val })} step={step} max={max} min={min} /> ); return ( setAttributes({ min: val })} step={step} max={max} /> setAttributes({ max: val })} step={step} min={min} /> setAttributes({ step: val })} />
); } } export default BlockEdit;