HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/gutenberg/src/blocks/spacer-v1/edit.js
/**
 * Internal dependencies
 */
import Inspector from './inspector';

/**
 * External dependencies
 */
import classnames from 'classnames';

/**
 * WordPress dependencies
 */
import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';

/**
 * Block edit function
 */
class Edit extends Component {

	render() {

		const { attributes, className, setAttributes, selected, isSelected } = this.props;
		const { heightDesktop, heightTablet, heightMobile } = attributes;

		let styles = {};

		if( heightDesktop ){
			styles['--height-lg'] = `${heightDesktop}px`;
		}

		if( heightTablet ){
			styles['--height-md'] = `${heightTablet}px`;
		}

		if( heightMobile ){
			styles['--height-sm'] = `${heightMobile}px`;
		}

		return (
			<Fragment>

				{ isSelected && (
					<Inspector
						{ ...this.props }
					/>
				) }

				<div className={ classnames( className, 'reyBlock-spacer-v1', {} ) } style={ styles }></div>
			</Fragment>
		);
	}
}

export default Edit;