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 / image-compare / index.js

index.js in Block Animations, Motion & Scroll Effects – Ghost Kit 3.3.3, at gutenberg/blocks/image-compare/index.js

37 lines 873 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import getIcon from '../../utils/get-icon';
2 import metadata from './block.json';
3 import edit from './edit';
4 import save from './save';
5
6 const { name } = metadata;
7
8 export { metadata, name };
9
10 export const settings = {
11 icon: getIcon('block-image-compare', true),
12 ghostkit: {
13 previewUrl: 'https://www.ghostkit.io/docs/blocks/image-compare/',
14 customStylesCallback(attributes) {
15 const styles = {
16 '--gkt-image-compare__position': undefined,
17 '--gkt-image-compare--divider__background-color':
18 attributes.colorDivider || undefined,
19 '--gkt-image-compare--divider-icons__color':
20 attributes.colorDividerIcon || undefined,
21 };
22
23 if (
24 typeof attributes.position !== 'undefined' &&
25 attributes.position !== ''
26 ) {
27 styles['--gkt-image-compare__position'] =
28 `${attributes.position}%`;
29 }
30
31 return styles;
32 },
33 },
34 edit,
35 save,
36 };
37