PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.2.0
GenerateBlocks v2.2.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 / block-context / button.js
generateblocks / src / block-context Last commit date
button-container.js 2 years ago button.js 2 years ago container.js 2 years ago default.js 2 years ago grid.js 3 years ago headline.js 2 years ago image.js 2 years ago index.js 2 years ago
button.js
123 lines
1 import defaultContext from './default';
2 import { __ } from '@wordpress/i18n';
3 import { defaultsDeep } from 'lodash';
4
5 const buttonContext = defaultsDeep( {
6 id: 'button',
7 supports: {
8 responsiveTabs: true,
9 settingsPanel: {
10 enabled: true,
11 icon: 'button-settings',
12 },
13 layout: {
14 enabled: true,
15 display: true,
16 flexDirection: true,
17 flexWrap: true,
18 alignItems: true,
19 justifyContent: true,
20 columnGap: true,
21 rowGap: true,
22 zIndex: true,
23 position: true,
24 },
25 flexChildPanel: {
26 enabled: true,
27 flex: true,
28 order: true,
29 },
30 sizingPanel: {
31 enabled: true,
32 width: true,
33 height: true,
34 minWidth: true,
35 minHeight: true,
36 maxWidth: true,
37 maxHeight: true,
38 useGlobalMaxWidth: true,
39 },
40 typography: {
41 enabled: true,
42 alignment: true,
43 fontWeight: true,
44 textTransform: true,
45 fontSize: true,
46 letterSpacing: true,
47 fontFamily: true,
48 },
49 spacing: {
50 enabled: true,
51 padding: true,
52 margin: true,
53 },
54 borders: {
55 enabled: true,
56 borderColors: [
57 {
58 state: '',
59 tooltip: __( 'Border', 'generateblocks' ),
60 alpha: true,
61 },
62 {
63 state: 'Hover',
64 tooltip: __( 'Border Hover', 'generateblocks' ),
65 alpha: true,
66 },
67 ],
68 borderTop: true,
69 borderRight: true,
70 borderBottom: true,
71 borderLeft: true,
72 borderRadius: true,
73 },
74 colors: {
75 enabled: true,
76 elements: [
77 {
78 group: 'background',
79 label: __( 'Background', 'generateblocks' ),
80 items: [
81 {
82 attribute: 'backgroundColor',
83 alpha: true,
84 },
85 {
86 tooltip: __( 'Hover', 'generateblocks' ),
87 attribute: 'backgroundColorHover',
88 alpha: true,
89 },
90 ],
91 },
92 {
93 group: 'text',
94 label: __( 'Text', 'generateblocks' ),
95 items: [
96 {
97 attribute: 'textColor',
98 },
99 {
100 tooltip: __( 'Hover', 'generateblocks' ),
101 attribute: 'textColorHover',
102 },
103 ],
104 },
105 ],
106 },
107 backgroundPanel: {
108 enabled: true,
109 backgroundGradient: true,
110 },
111 icon: {
112 enabled: true,
113 location: [
114 { label: __( 'Left', 'generateblocks' ), value: 'left' },
115 { label: __( 'Right', 'generateblocks' ), value: 'right' },
116 ],
117 iconSize: true,
118 },
119 },
120 }, defaultContext );
121
122 export default buttonContext;
123