PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.4.1
Block Animations, Motion & Scroll Effects – Ghost Kit v3.4.1
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 / instagram / index.js

index.js in Block Animations, Motion & Scroll Effects – Ghost Kit 3.4.1, at gutenberg/blocks/instagram/index.js

39 lines 855 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-instagram', true),
12 ghostkit: {
13 // previewUrl: 'https://www.ghostkit.io/docs/blocks/instagram/',
14 customStylesCallback(attributes) {
15 const { gap, gapCustom } = attributes;
16
17 const styles = {
18 '--gkt-instagram--photos__gap': undefined,
19 };
20
21 // Custom Gap.
22 if (
23 gap === 'custom' &&
24 typeof gapCustom !== 'undefined' &&
25 gapCustom !== ''
26 ) {
27 // we need to use `%` unit because of conflict with complex calc() and 0 value.
28 const unit = gapCustom ? 'px' : '%';
29
30 styles['--gkt-instagram--photos__gap'] = `${gapCustom}${unit}`;
31 }
32
33 return styles;
34 },
35 },
36 edit,
37 save,
38 };
39