PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.7.1
GenerateBlocks v1.7.1
2.4.1 2.4.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 3 years ago button.js 3 years ago container.js 3 years ago default.js 3 years ago grid.js 3 years ago headline.js 3 years ago image.js 3 years ago index.js 3 years ago
button.js
137 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 dimensions: [
52 {
53 type: 'padding',
54 label: __( 'Padding', 'generateblocks' ),
55 units: [ 'px', 'em', '%' ],
56 },
57 {
58 type: 'margin',
59 label: __( 'Margin', 'generateblocks' ),
60 units: [ 'px', 'em', '%' ],
61 },
62 {
63 type: 'borderSize',
64 label: __( 'Border Size', 'generateblocks' ),
65 units: [ 'px' ],
66 },
67 {
68 type: 'borderRadius',
69 label: __( 'Border Radius', 'generateblocks' ),
70 units: [ 'px', 'em', '%' ],
71 },
72 ],
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 group: 'border',
107 label: __( 'Border', 'generateblocks' ),
108 items: [
109 {
110 attribute: 'borderColor',
111 alpha: true,
112 },
113 {
114 tooltip: __( 'Hover', 'generateblocks' ),
115 attribute: 'borderColorHover',
116 alpha: true,
117 },
118 ],
119 },
120 ],
121 },
122 backgroundPanel: {
123 enabled: true,
124 backgroundGradient: true,
125 },
126 icon: {
127 enabled: true,
128 location: [
129 { label: __( 'Left', 'generateblocks' ), value: 'left' },
130 { label: __( 'Right', 'generateblocks' ), value: 'right' },
131 ],
132 },
133 },
134 }, defaultContext );
135
136 export default buttonContext;
137