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

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

69 lines 1.3 KB
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-carousel', true),
12 ghostkit: {
13 previewUrl: 'https://www.ghostkit.io/docs/blocks/carousel/',
14 customStylesCallback(attributes) {
15 const { fadeEdges, fadeEdgesSize } = attributes;
16 const styles = {
17 '--gkt-carousel--fade-edges__size': undefined,
18 };
19
20 if (
21 fadeEdges &&
22 typeof fadeEdgesSize !== 'undefined' &&
23 fadeEdgesSize !== ''
24 ) {
25 styles['--gkt-carousel--fade-edges__size'] =
26 `${fadeEdgesSize}%`;
27 }
28
29 return styles;
30 },
31 },
32 example: {
33 attributes: {
34 slides: 3,
35 },
36 innerBlocks: [
37 {
38 name: 'ghostkit/carousel-slide',
39 innerBlocks: [
40 {
41 name: 'core/image',
42 attributes: {
43 sizeSlug: 'large',
44 url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',
45 },
46 },
47 ],
48 },
49 {
50 name: 'ghostkit/carousel-slide',
51 innerBlocks: [
52 {
53 name: 'core/image',
54 attributes: {
55 sizeSlug: 'large',
56 url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',
57 },
58 },
59 ],
60 },
61 {
62 name: 'ghostkit/carousel-slide',
63 },
64 ],
65 },
66 edit,
67 save,
68 };
69