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

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

52 lines 1.0 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 import transforms from './transforms';
6
7 const { name } = metadata;
8 export { metadata, name };
9
10 import { __ } from '@wordpress/i18n';
11
12 export const settings = {
13 icon: getIcon('block-video', true),
14 ghostkit: {
15 previewUrl: 'https://www.ghostkit.io/docs/blocks/video/',
16 customStylesCallback(attributes) {
17 const { videoBackgroundColor, videoBackgroundGradient } =
18 attributes;
19
20 const styles = {
21 video: {
22 'background-color': videoBackgroundColor || undefined,
23 'background-image': videoBackgroundGradient || undefined,
24 },
25 };
26
27 return styles;
28 },
29 },
30 example: {
31 attributes: {
32 poster: 1,
33 posterUrl:
34 'https://s.w.org/images/core/5.3/Glacial_lakes,_Bhutan.jpg',
35 },
36 },
37 styles: [
38 {
39 name: 'default',
40 label: __('Plain', 'ghostkit'),
41 isDefault: true,
42 },
43 {
44 name: 'icon-only',
45 label: __('Icon Only', 'ghostkit'),
46 },
47 ],
48 edit,
49 save,
50 transforms,
51 };
52