PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.0.2
GenerateBlocks v2.0.2
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 / extend / inspector-control / controls / typography / attributes.js
generateblocks / src / extend / inspector-control / controls / typography Last commit date
components 2 years ago attributes.js 2 years ago editor.scss 3 years ago google-fonts.json 2 years ago index.js 2 years ago options.js 2 years ago
attributes.js
97 lines
1 export default function getTypographyAttributes( defaults ) {
2 return {
3 typography: {
4 type: 'object',
5 default: {},
6 },
7 fontWeight: {
8 type: 'string',
9 default: defaults.fontWeight,
10 },
11 textTransform: {
12 type: 'string',
13 default: '',
14 },
15 alignment: {
16 type: 'string',
17 default: defaults.alignment,
18 },
19 alignmentTablet: {
20 type: 'string',
21 default: defaults.alignmentTablet,
22 },
23 alignmentMobile: {
24 type: 'string',
25 default: defaults.alignmentMobile,
26 },
27 // FONT SIZE ATTRIBUTES
28 fontSize: {
29 type: 'number',
30 default: defaults.fontSize,
31 },
32 fontSizeTablet: {
33 type: 'number',
34 default: defaults.fontSizeTablet,
35 },
36 fontSizeMobile: {
37 type: 'number',
38 default: defaults.fontSizeMobile,
39 },
40 fontSizeUnit: {
41 type: 'string',
42 default: defaults.fontSizeUnit,
43 },
44
45 // LINE HEIGHT ATTRIBUTES
46 lineHeight: {
47 type: 'number',
48 default: defaults.lineHeight,
49 },
50 lineHeightTablet: {
51 type: 'number',
52 default: defaults.lineHeightTablet,
53 },
54 lineHeightMobile: {
55 type: 'number',
56 default: defaults.lineHeightMobile,
57 },
58 lineHeightUnit: {
59 type: 'string',
60 default: defaults.lineHeightUnit,
61 },
62
63 // LETTER SPACING ATTRIBUTES
64 letterSpacing: {
65 type: 'number',
66 default: defaults.letterSpacing,
67 },
68 letterSpacingTablet: {
69 type: 'number',
70 default: defaults.letterSpacingTablet,
71 },
72 letterSpacingMobile: {
73 type: 'number',
74 default: defaults.letterSpacingMobile,
75 },
76
77 // FONT FAMILY ATTRIBUTES
78 fontFamily: {
79 type: 'string',
80 default: defaults.fontFamily,
81 },
82 fontFamilyFallback: {
83 type: 'string',
84 default: defaults.fontFamilyFallback,
85 },
86 googleFont: {
87 type: 'boolean',
88 default: defaults.googleFont,
89 },
90 googleFontVariants: {
91 type: 'string',
92 default: defaults.googleFontVariants,
93 },
94
95 };
96 }
97