-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
index.js
80 lines (75 loc) · 1.52 KB
/
index.js
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
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { group as icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import initBlock from '../utils/init-block';
import deprecated from './deprecated';
import edit from './edit';
import metadata from './block.json';
import save from './save';
import transforms from './transforms';
import variations from './variations';
const { name } = metadata;
export { metadata, name };
export const settings = {
icon,
example: {
attributes: {
layout: {
type: 'constrained',
justifyContent: 'center',
},
style: {
spacing: {
padding: {
top: '4em',
right: '3em',
bottom: '4em',
left: '3em',
},
},
},
},
innerBlocks: [
{
name: 'core/heading',
attributes: {
content: __( 'La Mancha' ),
textAlign: 'center',
},
},
{
name: 'core/paragraph',
attributes: {
align: 'center',
content: __(
'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'
),
},
},
{
name: 'core/spacer',
attributes: {
height: '10px',
},
},
{
name: 'core/button',
attributes: {
text: __( 'Read more' ),
},
},
],
viewportWidth: 600,
},
transforms,
edit,
save,
deprecated,
variations,
};
export const init = () => initBlock( { name, metadata, settings } );