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/container-v1/save.js
/**
 * External dependencies
 */
import classnames from 'classnames';

/**
 * WordPress dependencies
 */
import { InnerBlocks, getColorClassName } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';

const save = ( { attributes } ) => {

	const { align, offsetAlign, maxWidth , backgroundColor, textColor, customBackgroundColor, customTextColor } = attributes;

	const backgroundClass = getColorClassName( 'background-color', backgroundColor );
	const textClass = getColorClassName( 'color', textColor );

	let styles = {
		backgroundColor: backgroundClass ? undefined : customBackgroundColor,
		color: textClass ? undefined : customTextColor,
	};

	if( maxWidth ){
		styles['--max-width'] = `${maxWidth}px`;
		styles['width'] = '100%';
	}

	return (
		<div
			className={ classnames( 'reyBlock-container-v1', {
				[ `--offsetAlign-${ offsetAlign }` ]: offsetAlign !== '',
				'has-background': backgroundColor || customBackgroundColor,
				'has-text-color': textColor || customTextColor,
				[ textClass ]: textClass,
				[ backgroundClass ]: backgroundClass,
			} ) }
			data-align={ align }
			style={ styles }
		>
			<div className="reyBlock-containerInner">
				<InnerBlocks.Content />
			</div>
		</div>
	);

};

export default save;