1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/**
* Internal dependencies
*/
export { default as save } from './save';
import { LAYOUT_DEFAULT } from './constants';
export const attributes = {
// Set default align
align: {
default: 'center',
type: 'string',
},
// Set default className (used with block styles)
className: {
default: `is-style-${ LAYOUT_DEFAULT }`,
type: 'string',
},
columns: {
type: 'number',
},
ids: {
default: [],
type: 'array',
},
images: {
type: 'array',
default: [],
source: 'query',
selector: '.tiled-gallery__item',
query: {
alt: {
attribute: 'alt',
default: '',
selector: 'img',
source: 'attribute',
},
caption: {
selector: 'figcaption',
source: 'html',
type: 'string',
},
height: {
attribute: 'data-height',
selector: 'img',
source: 'attribute',
type: 'number',
},
id: {
attribute: 'data-id',
selector: 'img',
source: 'attribute',
},
link: {
attribute: 'data-link',
selector: 'img',
source: 'attribute',
},
url: {
attribute: 'data-url',
selector: 'img',
source: 'attribute',
},
width: {
attribute: 'data-width',
selector: 'img',
source: 'attribute',
type: 'number',
},
},
},
linkTo: {
default: 'none',
type: 'string',
},
};
export const support = {
align: [ 'center', 'wide', 'full' ],
customClassName: false,
html: false,
};
|