UNPKG

@wordpress/block-library

Version:
24 lines (18 loc) 632 B
/** * External dependencies */ import classnames from 'classnames'; /** * WordPress dependencies */ import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor'; export default function save( { attributes } ) { const { isStackedOnMobile, verticalAlignment } = attributes; const className = classnames( { [ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, [ `is-not-stacked-on-mobile` ]: ! isStackedOnMobile, } ); const blockProps = useBlockProps.save( { className } ); const innerBlocksProps = useInnerBlocksProps.save( blockProps ); return <div { ...innerBlocksProps } />; }