PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.0.0
GenerateBlocks v2.0.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / extend / inspector-control / controls / layout / attributes.js
generateblocks / src / extend / inspector-control / controls / layout Last commit date
components 2 years ago attributes.js 3 years ago index.js 2 years ago options.js 3 years ago
attributes.js
52 lines
1
2 export default function getLayoutAttributes( defaults ) {
3 const options = [
4 'display',
5 'flexDirection',
6 'flexWrap',
7 'alignItems',
8 'justifyContent',
9 'columnGap',
10 'rowGap',
11 'position',
12 'overflowX',
13 'overflowY',
14 ];
15
16 const attributes = {};
17
18 options.forEach( ( option ) => {
19 attributes[ option ] = {
20 type: 'string',
21 default: defaults[ option ],
22 };
23
24 attributes[ option + 'Tablet' ] = {
25 type: 'string',
26 default: defaults[ option + 'Tablet' ],
27 };
28
29 attributes[ option + 'Mobile' ] = {
30 type: 'string',
31 default: defaults[ option + 'Mobile' ],
32 };
33 } );
34
35 attributes.zindex = {
36 type: 'number',
37 default: defaults.zindex,
38 };
39
40 attributes.zindexTablet = {
41 type: 'number',
42 default: defaults.zindexTablet,
43 };
44
45 attributes.zindexMobile = {
46 type: 'number',
47 default: defaults.zindexMobile,
48 };
49
50 return attributes;
51 }
52