PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.8
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.8
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / src / global-settings / defaultConstant.js

defaultConstant.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.8, at src/global-settings/defaultConstant.js

175 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const defaultSizes = (fontSize, lineHeight = "") => {
2 return {
3 fontSize: {
4 device: {
5 Desktop: fontSize,
6 Tablet: "",
7 Mobile: "",
8 },
9 unit: {
10 Desktop: "px",
11 Tablet: "px",
12 Mobile: "px",
13 },
14 },
15 lineHeight: {
16 device: {
17 Desktop: lineHeight,
18 Tablet: "",
19 Mobile: "",
20 },
21 },
22 };
23 };
24 export const defaultTypography = (slug, title, type, sizes) => {
25 return {
26 slug,
27 type,
28 title,
29 typography: {
30 family: "",
31 fontWeight: "",
32 style: "",
33 transform: "",
34 decoration: "",
35 },
36 letterSpacing: {
37 device: {
38 Desktop: "",
39 Tablet: "",
40 Mobile: "",
41 },
42 unit: {
43 Desktop: "px",
44 Tablet: "px",
45 Mobile: "px",
46 },
47 },
48 wordSpacing: {
49 device: {
50 Desktop: "",
51 Tablet: "",
52 Mobile: "",
53 },
54 unit: {
55 Desktop: "px",
56 Tablet: "px",
57 Mobile: "px",
58 },
59 },
60 sizes,
61 };
62 };
63
64 export const customTypography = (key, title, type, fontSize) => {
65 return {
66 ...defaultTypography(key, title, type),
67 ...defaultSizes(fontSize),
68 };
69 };
70
71 const headingSizes = [
72 defaultSizes(44),
73 defaultSizes(32),
74 defaultSizes(24),
75 defaultSizes(22),
76 defaultSizes(20),
77 defaultSizes(18),
78 ];
79
80 const bodySizes = [defaultSizes(18), defaultSizes(16), defaultSizes(14), defaultSizes(12)];
81
82 const buttonSizes = [defaultSizes(18), defaultSizes(16)];
83
84 const typographySizes = {
85 heading: [defaultTypography("heading", "Heading", "heading", headingSizes)],
86 body: [defaultTypography("body", "Body", "body", bodySizes)],
87 button: [defaultTypography("button", "Button", "button", buttonSizes)],
88 custom: [],
89 };
90
91 export const globalTypographyDefault = {
92 overrideThemeTypo: false,
93 fontList: [],
94 typographySizes,
95 typographyCss: "",
96 };
97
98 export const shadowDefaultList = {
99 shadowList: [
100 {
101 title: "Subtle (1dp)",
102 custom: false,
103 slug: "subtle-1dp",
104 type: "outset",
105 "x-offset": "0",
106 "y-offset": "1",
107 blur: "2",
108 speared: "0",
109 color: "rgba(0, 0, 0, 0.12)",
110 },
111 {
112 title: "Light (2dp)",
113 slug: "light-2dp",
114 custom: false,
115 type: "outset",
116 "x-offset": "0",
117 "y-offset": "2",
118 blur: "4",
119 speared: "0",
120 color: "rgba(0, 0, 0, 0.14)",
121 },
122 {
123 title: "Medium (4dp)",
124 slug: "medium-4dp",
125 custom: false,
126 type: "outset",
127 "x-offset": "0",
128 "y-offset": "4",
129 blur: "6",
130 speared: "0",
131 color: "rgba(0, 0, 0, 0.16)",
132 },
133 {
134 title: "Strong (8dp)",
135 slug: "strong-8dp",
136 custom: false,
137 type: "outset",
138 "x-offset": "0",
139 "y-offset": "8",
140 blur: "18",
141 speared: "0",
142 color: "rgba(0, 0, 0, 0.18)",
143 },
144 {
145 title: "Deep (12dp)",
146 slug: "deep-12dp",
147 custom: false,
148 type: "outset",
149 "x-offset": "0",
150 "y-offset": "12",
151 blur: "17",
152 speared: "0",
153 color: "rgba(0, 0, 0, 0.20)",
154 },
155 {
156 title: "Sharp (4dp)",
157 slug: "sharp-4dp",
158 custom: false,
159 type: "outset",
160 "x-offset": "4",
161 "y-offset": "4",
162 blur: "0",
163 speared: "0",
164 color: "rgba(0, 0, 0, 0.25)",
165 },
166 ],
167 shadowRootCSS: "",
168 };
169
170 export const breakpointDefault = {
171 container: "1200",
172 tablet: "1023",
173 mobile: "767",
174 };
175