summaryrefslogtreecommitdiff
blob: 54ed026c4d9d13f3e83706fc4c027dac79a02eb0 (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
/**
 * External dependencies
 */
import { __, _x } from '@wordpress/i18n';
import { Path, SVG } from '@wordpress/components';

/**
 * Internal dependencies
 */
import edit from './edit';

// Ordering is important! Editor overrides style!
import './style.scss';
import './editor.scss';

export const name = 'gif';
export const title = __( 'GIF', 'jetpack' );

export const icon = (
	<SVG xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
		<Path fill="none" d="M0 0h24v24H0V0z" />
		<Path d="M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z" />
	</SVG>
);

export const settings = {
	title,
	icon,
	category: 'jetpack',
	keywords: [
		_x( 'animated', 'block search term', 'jetpack' ),
		_x( 'giphy', 'block search term', 'jetpack' ),
		_x( 'image', 'block search term', 'jetpack' ),
	],
	description: __( 'Search for and insert an animated image.', 'jetpack' ),
	attributes: {
		align: {
			type: 'string',
			default: 'center',
		},
		caption: {
			type: 'string',
		},
		giphyUrl: {
			type: 'string',
		},
		searchText: {
			type: 'string',
		},
		paddingTop: {
			type: 'string',
			default: '56.2%',
		},
	},
	supports: {
		html: false,
		align: true,
	},
	edit,
	save: () => null,
};