PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.2
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.2
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 / hooks / useDefaultValue.js

useDefaultValue.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.2, at src/hooks/useDefaultValue.js

54 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const useDefaultValue = (blockName) => {
2 const defaultValue = {
3 titleFontSize: 22,
4 imageWidth: 100,
5 imageSpace: 12,
6 largeItemTitleFontSize: 26,
7 metaColor: "#333333",
8 badgesFontSize: 10,
9 carouselArrowHorizontal: 30,
10 };
11
12 const defaultData = {
13 "post-list-two": {
14 ...defaultValue,
15 titleFontSize: "",
16 imageWidth: "",
17 imageSpace: "",
18 },
19 "post-list-three": {
20 ...defaultValue,
21 largeItemTitleFontSize: "",
22 titleFontSize: "",
23 metaColor: "",
24 },
25 "post-carousel": {
26 ...defaultValue,
27 carouselArrowHorizontal: -22,
28 },
29 "post-carousel-two": {
30 ...defaultValue,
31 carouselArrowHorizontal: -22,
32 },
33 "post-timeline-three": {
34 ...defaultValue,
35 carouselArrowHorizontal: -10,
36 },
37 "post-slider-two": {
38 ...defaultValue,
39 carouselArrowHorizontal: "",
40 },
41 "thumbnail-slider-two": {
42 ...defaultValue,
43 carouselArrowHorizontal: "",
44 },
45 default: {
46 ...defaultValue,
47 },
48 };
49
50 return defaultData[blockName] ? defaultData[blockName] : defaultData["default"];
51 };
52
53 export default useDefaultValue;
54