PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.0.0
GenerateBlocks v2.0.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / blocks / looper / save.js
generateblocks / src / blocks / looper Last commit date
components 1 year ago block.json 1 year ago edit.js 1 year ago editor.scss 1 year ago index.js 1 year ago save.js 1 year ago
save.js
29 lines
1 /**
2 * WordPress dependencies
3 */
4 import { getBlockClasses } from '@utils/getBlockClasses';
5 import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';
6
7 export function Save( { attributes } ) {
8 const {
9 tagName: Tag,
10 htmlAttributes = {},
11 } = attributes;
12
13 const classNames = getBlockClasses(
14 'gb-looper',
15 attributes,
16 );
17
18 const blockProps = useBlockProps.save(
19 {
20 className: classNames.join( ' ' ).trim(),
21 ...htmlAttributes,
22 }
23 );
24
25 return (
26 <Tag { ...useInnerBlocksProps.save( blockProps ) } />
27 );
28 }
29