PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.3.2
Block Animations, Motion & Scroll Effects – Ghost Kit v3.3.2
3.7.2 3.7.1 3.7.0 3.6.1 trunk 1.6.3 2.25.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.6.0
ghostkit / gutenberg / blocks / shape-divider / save.js

save.js in Block Animations, Motion & Scroll Effects – Ghost Kit 3.3.2, at gutenberg/blocks/shape-divider/save.js

36 lines 856 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import classnames from 'classnames/dedupe';
2
3 import { useBlockProps } from '@wordpress/block-editor';
4 import { applyFilters } from '@wordpress/hooks';
5
6 import { maybeDecode } from '../../utils/encode-decode';
7 import metadata from './block.json';
8
9 const { name } = metadata;
10
11 /**
12 * Block Save Class.
13 *
14 * @param props
15 */
16 export default function BlockSave(props) {
17 const { svg, flipVertical, flipHorizontal } = props.attributes;
18
19 let className = classnames('ghostkit-shape-divider', {
20 'ghostkit-shape-divider-flip-vertical': flipVertical,
21 'ghostkit-shape-divider-flip-horizontal': flipHorizontal,
22 });
23
24 className = applyFilters('ghostkit.blocks.className', className, {
25 name,
26 ...props,
27 });
28
29 const blockProps = useBlockProps.save({
30 className,
31 dangerouslySetInnerHTML: { __html: maybeDecode(svg) },
32 });
33
34 return <div {...blockProps} />;
35 }
36