PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.3.3
Block Animations, Motion & Scroll Effects – Ghost Kit v3.3.3
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 / gist / save.js

save.js in Block Animations, Motion & Scroll Effects – Ghost Kit 3.3.3, at gutenberg/blocks/gist/save.js

35 lines 754 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { applyFilters } from '@wordpress/hooks';
2
3 import metadata from './block.json';
4
5 const { name } = metadata;
6
7 import { useBlockProps } from '@wordpress/block-editor';
8
9 /**
10 * Block Save Class.
11 *
12 * @param props
13 */
14 export default function BlockSave(props) {
15 const { url, file, caption, showFooter, showLineNumbers } =
16 props.attributes;
17
18 let className = 'ghostkit-gist';
19 className = applyFilters('ghostkit.blocks.className', className, {
20 name,
21 ...props,
22 });
23
24 const blockProps = useBlockProps.save({
25 className,
26 'data-url': url,
27 'data-file': file,
28 'data-caption': caption,
29 'data-show-footer': showFooter ? 'true' : 'false',
30 'data-show-line-numbers': showLineNumbers ? 'true' : 'false',
31 });
32
33 return <div {...blockProps} />;
34 }
35