summaryrefslogtreecommitdiff
blob: f94259f4577d7bff55d131545429754e759fa1d7 (plain)
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
/**
 * External dependencies
 */
import { __, _x } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { Path, Circle } from '@wordpress/components';

/**
 * Internal dependencies
 */
import edit from './edit';
import save from './save';
import renderMaterialIcon from '../../../shared/render-material-icon';

const attributes = {
	address: {
		type: 'string',
		default: '',
	},
	addressLine2: {
		type: 'string',
		default: '',
	},
	addressLine3: {
		type: 'string',
		default: '',
	},
	city: {
		type: 'string',
		default: '',
	},
	region: {
		type: 'string',
		default: '',
	},
	postal: {
		type: 'string',
		default: '',
	},
	country: {
		type: 'string',
		default: '',
	},
	linkToGoogleMaps: {
		type: 'boolean',
		default: false,
	},
};

export const name = 'address';

export const settings = {
	title: __( 'Address', 'jetpack' ),
	description: __( 'Lets you add a physical address with Schema markup.', 'jetpack' ),
	keywords: [
		_x( 'location', 'block search term', 'jetpack' ),
		_x( 'direction', 'block search term', 'jetpack' ),
		_x( 'place', 'block search term', 'jetpack' ),
	],
	icon: renderMaterialIcon(
		<Fragment>
			<Path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z" />
			<Circle cx="12" cy="9" r="2.5" />
		</Fragment>
	),
	category: 'jetpack',
	attributes,
	parent: [ 'jetpack/contact-info' ],
	edit,
	save,
};